|
|
back to board100*100 not enough? So the problems says that 1 <= N <= 100, so I declare a nice unsigned char mem[100*100]. I get WA on test 4. I go and read all the discussion about wrong awsers but none of those offer anything I didn't figure out already. I change the declaration to unsigned char mem[256*256] and voila, the solution is magically accepted. Does anyone have an idea why 100*100 bytes aren't enough? Re: 100*100 not enough? I wrote a solution in Pascal (ages ago :-)), which AFAIR checks whether index is in range while accessing to some element in array. And I had [1..100,1..100]. That is why I suppose that somewhere in your program you access out of array. Re: 100*100 not enough? Posted by Bogatyr 16 Sep 2012 16:44 100x100 is enough, assuming you start your indexing at 0 and end at n-1 |
|
|