Ha, a turkey passed it - just used 49K memory!!!
Posted by
turkeys 27 Feb 2002 16:00
Ha, a turkey passed it - just used 49K memory!!!
Re: Ha, a turkey passed it - just used 49K memory!!!
Can you explain how you did it? When you have a test case like this:
5
4 5
4 5
4 5
4 5
5 5
How can you get the answer without reading in everything?
Re: Ha, a turkey passed it - just used 49K memory!!!
You read everything...... Just think over the way to keep it :)
> Can you explain how you did it? When you have a test case like this:
> 5
> 4 5
> 4 5
> 4 5
> 4 5
> 5 5
>
> How can you get the answer without reading in everything?
Re: Ha, a turkey passed it - just used 49K memory!!!
I really don't know how to... I solved it by "chopping" a char into
2...you mean there's a better way of storing the numbers?
Re: Ha, a turkey passed it - just used 49K memory!!!
well, there are two ways of solving this :
1. store in char two by two the nums
2. store in long 8 of the nums
I used the second, but the first should be OK, too.......
And the cat get AC too, although with 53K.
Posted by
meoden 1 Mar 2002 12:45
Re: Ha, a turkey passed it - just used 49K memory!!!
I stored 9 digits in longint, but still I was QUITE far from those
49K they're talking about... 8-)
Re: Ha, a turkey passed it - just used 49K memory!!!
I think that you can't count.
1000000/8*4*2 = ...
Yes you're right = 1000000 so it's more less 1000K
So how did you do it using only 49K?