Page 1 of 1
Invalid Memory Reference
Posted: Thu Jan 30, 2003 4:17 am
by Sneeze
Some of my programs work well in my computer, but I will get a "Invalid Memory Reference" crash message. What does it mean? How could I fixed the problem?

Posted: Thu Jan 30, 2003 7:33 am
by ..
Mostly because your program isn't correct. When the judge use some test cases to test your program, your program can't handle it correctly and get segmentation fault.
Also, are you sure your program reading input correctly? Is the problem you are solving in the multiple input format?
The discription of the problems
Posted: Fri Jan 31, 2003 11:14 am
by Sneeze
Sometimes the description of the problems really confuses me. For example, q477 should be a very easy one; after I enlarged my array size (for example, double something[10000]), I got "accepted" response. However, the description didn't mention it would be rejudged. Insted, it clearly mentioned there would be 10 sets of data. I thought I got a lesson. But is it necessary to ignore some part of the description and expand my array size?

Posted: Fri Jan 31, 2003 7:23 pm
by ..
For that problem, I just declare an array of size 10 to hold the data.
If you get accepted after declaring a largesr size, I think you got array index out of bound somewhere in your program.........