1. judge上返回結果與可能的問題、解決方案 內容來源:http://acm.tju.edu.cn/toj/faq.html
Q: What is the meaning of the judge's reply XXXXX?
A: Here is a list of the judge's replies and their meaning:
Received : The judge system has received your solution, usually you just need to wait a minute and your solution will be judged.
收到程式,等待判題程式判題即可。
Accepted (AC) : OK! Your program is correct!
通過。
Presentation Error (PE) : Output Format Error. Your output format is not exactly the same as the judge's output, although your answer to the problem is correct. Check your output for spaces, blank lines, etc. against the problem output specification.
輸出格式錯誤。查看是否有多餘的換行,是否行末有空格,或者摸個地方是否多輸出了空格。
Wrong Answer (WA) : Correct solution not reached for the inputs. The inputs and outputs that we use to test the programs are not public. Some problems with special judge may not reply "Presentation Error", replaced by "Wrong Answer".
得到的答案錯了。再思考思考。也有可能格式不對,比如沒有在應該空格的地方輸出空格,也有可能導致這個錯誤。
Runtime Error (RE) : Your program failed during the execution (segmentation fault, floating point exception...). The exact cause is reported except Java.
執行階段錯誤。越界、除零了,都有可能。檢查運算式會不會出現除零問題。查看數組大小是否符合要求,程式會不會出現訪問非法記憶體位置。
Time Limit Exceeded (TLE) : Your program tried to run with too much CPU time.
逾時錯誤。死迴圈、演算法複雜度太高、越界都有可能。
Memory Limit Exceeded (MLE) : Your program tried to use more memory than the judge default settings.
超出記憶體限制。記憶體佔用太高了,檢查是否使用了局部陣列變數(放到main函數外面),是否記憶體開太大了。
Output Limit Exceeded (OLE): Your program tried to write too much. This usually occurs if it goes into an infinite loop. The output limit is usually 256K, 512K, or 1M bytes.
輸出超出限制錯誤。輸出太多了。死迴圈導致不停輸出的可能性最大。
Compilation Error (CE) : The compiler (gcc/g++/gpc/fpc/javac) could not compile your program. Of course, warning messages are not error messages. Click the link at the judge reply to see the actual error message.
編譯錯誤,檢查選擇的程式設計語言對不對。點擊查看編譯返回的結果,修改即可。
Restricted Function (RF): Your program tried to call restricted functions. For example, maybe you have tried to open a file which is forbidden on OJ. It may also caused by Runtime Error (e.g. maybe a pointer point to wrong funtion), just consider it as Runtime Error in this situation.
使用非法函數。越界、使用了禁止使用的函數如系統調用函數system();
Internal Error (IE): The Judge system cause an internal error, please submit it later.
內部錯誤。過一會再交如果出現大量此錯誤,發郵件給管理員。
執行階段錯誤涉及的錯誤類型:
Q: What does SIGSEGV in Runtime Error stand for?
A: The following messages will not be shown to you in contest. Here we just provide some tips:
SIGSEGV --- Invalid memory reference (segment fault). The possible cases of your encountering this error are:
buffer overflow --- usually caused by a pointer reference out of range. 緩衝區溢位,可能是指標非法訪問
stack overflow --- please keep in mind that the default stack size is 8192K. 棧空間溢出
illegal file access --- file operations are forbidden on our judge system. 非法訪問檔案。
SIGFPE --- Floating point exception (divided by 0) 除零
SIGBUS --- Bus error (bad memory access) 訪問壞的記憶體位址(可能就是每這個地址)
SIGILL --- Illegal Instruction. 非法指令。
SIGABRT --- Programme aborted before it should be finished. 意外終止。
man 7 signal under Linux for more information
捷徑:
Q: Can I use shortcut key when submitting?
A: Here are shortcut keys defined in the submit page.
Alt + u : User ID field
Alt + w : Password field
Alt + p : Problem ID field
Alt + l : Language field
Alt + c : Source Code field
Alt + r : Source File field
Alt + s or Ctrl + Enter or Ctrl + w : Submit Button