Life, the universe, and Everything - Huge memory use difference

Hi all,

I was going through this question to better understand which input/output scheme would be more time-space efficient.

However all my solutions had an unusually high space usage of around 177+ MB, so was a little puzzled.

I looked over some solutions and gave a shot by putting in the solution of someone [Credit goes to dfedotov] who has done it in the same language [JAVA].

But the solutions again confused me as the difference in the same code was huge [JAVA]:

  1. 1641711 [My solution] 0.29 secs 177.3M

  2. 991526 [Original solution] 0.30 secs 0M

Can anybody help me to understand why there is such a huge difference for the same language?

Yes dude , I saw both the solutions , they are the same . I too submit my code in Java. I have also seen this unexpected discrepancy in memory usage shown . I guess since memory usage is not accounted in award of points during contests they have not paid much attention to it . It could be that they have several different kind of system testing our solution and depending on where our solution ran , it may report the memory usage of our program or the memory usage of entire Java Virtual Machine .
If anybody has a better explanation , I too would be interested to know .
@admin : can you guys have a look at our problem .