ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1048. Superlong Sums

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!!!
Posted by Junjie Liang 27 Feb 2002 16:22
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!!!
Posted by Algorist 28 Feb 2002 01:37
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!!!
Posted by Junjie Liang 28 Feb 2002 13:11
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!!!
Posted by Algorist 1 Mar 2002 01:42
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!!!
Posted by Alex[LSD] 18 May 2002 13:42
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!!!
Posted by Krzysztof "Doodge" Drozdz 28 Jun 2002 16:50
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?