
Invalid Memory Reference
Moderator: Board moderators
Invalid Memory Reference
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? 

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?
Also, are you sure your program reading input correctly? Is the problem you are solving in the multiple input format?
My signature:
- Please make discussion about the algorithm BRFORE posting source code.
We can learn much more in discussion than reading source code. - I HATE testing account.
- Don't send me source code for debug.
The discription of the problems
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? 

Last edited by Sneeze on Sat Feb 01, 2003 2:56 pm, edited 1 time in total.
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.........
If you get accepted after declaring a largesr size, I think you got array index out of bound somewhere in your program.........
My signature:
- Please make discussion about the algorithm BRFORE posting source code.
We can learn much more in discussion than reading source code. - I HATE testing account.
- Don't send me source code for debug.