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

Can anyone help me or at least give me a hint?
Posted by Simeon Kostenski 17 Apr 2001 03:20
I've submitted this problem thousands of times but in
vain.... Always "MEMORY LIMIT EXCEEDED". And how then? I
just have an array [1..1000000]of 0..19 and almost that's
all but- "memory limit exceeded". I just can't imagine how
you can not exceed it- at least, it is obvious that you
must keep the numbers beacuse they are in reversed order-
from the first to the last. So, I tried different
sollutions but none of them was accepteed. Help please....
Re: Can anyone help me or at least give me a hint?
Posted by Krzysztof Kapuscik 20 Apr 2001 18:42
I use -> unsigned char cell[(1000000+1)/2];
in pascal -> array [1..(1000000+1)/2] of byte and store two
digits in one byte.
Re: Can anyone help me or at least give me a hint?
Posted by Donny Riyadi 7 Jun 2001 10:40
> I use -> unsigned char cell[(1000000+1)/2];
> in pascal -> array [1..(1000000+1)/2] of byte and store
two
> digits in one byte.
what do u mean by (1000000+1/2) its not valid, its must be
rounded. and do u have any idea how to make the array
possible to store up to 1000000 data ? I mean array
[1..1000000] ?
Re: Can anyone help me or at least give me a hint?
Posted by Mih 31 Jul 2001 21:12
you don't have to STORE theese numbers in any array
Re: Can anyone help me or at least give me a hint?
Posted by liufeng 7 Sep 2001 09:10
> I've submitted this problem thousands of times but in
> vain.... Always "MEMORY LIMIT EXCEEDED". And how then? I
> just have an array [1..1000000]of 0..19 and almost that's
> all but- "memory limit exceeded". I just can't imagine
how
> you can not exceed it- at least, it is obvious that you
> must keep the numbers beacuse they are in reversed order-
> from the first to the last. So, I tried different
> sollutions but none of them was accepteed. Help please....
the problem is so easy that i don't know why the difficulty
of it is so high! my program only use 65k memory:)
you needn't record all the sum numbers,just write some
numbers while reading some numbers,but there are some
skills in it to compute the sum! you should analyze every
case your program read. i don't want to tell the methods.
it's your task!