|
|
back to boardCan anyone help me or at least give me a hint? 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? 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? > 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? > 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! |
|
|