ACM 在线平台(OJ)评判结果 错误类型 及解决办法

首先po张图,展现下平台的评判整体流程:

 

运行编译提醒

Waiting  程序刚刚提交,正在等待OJ评测你的程序。

Compiling    代码正在后台编译

Running     程序运行

Judging    OJ正在检查您程序的输出是否正确

 

正确通过
Accepted     程序正确,题目已经正确解答

 

常见错误

Compilation Error    代码编译错误

可以点击查看编译错误细节

Runtime Error  程序运行时错误,一般是程序在运行期间执行了非法的操作造成的

常见情况:

ACCESS_VIOLATION 您的程序想从一些非法的地址空间读取或向其中写入内容。一般例如指针、数组下标越界都会造成这个错误的。

ARRAY_BOUNDS_EXCEEDED 您的程序试图访问一个超出硬件支持范围的数组单元。

FLOAT_DENORMAL_OPERAND 进行了一个非正常的浮点操作。一般是由于一个非正常的浮点数参与了浮点操作所引起的,比如这个数的浮点格式不正确。

FLOAT_DIVIDE_BY_ZERO 浮点数除法出现除数为零的异常。

FLOAT_OVERFLOW 浮点溢出。要表示的数太大,超出了浮点数的表示范围。

FLOAT_UNDERFLOW 浮点下溢。要表示的数太小,超出了浮点数的表示范围。

INTEGER_DIVIDE_BY_ZERO 在进行整数除法的时候出现了除数为零的异常。

INTEGER_OVERFLOW 整数溢出。要表示的数值太大,超出了整数变量的范围。

STACK_OVERFLOW 栈溢出。一般是由于无限递归或者在函数里使用了太大的数组变量的原因。顾名思义,stack overflow 就是是栈溢出了。在进行数值运算时,我们常常要和运算结果的溢出打交道。数值运算结果可能上溢(overflow),也可能是下溢underflow)。不过栈的溢出显然只可能是上溢,即栈空间被用完了。

要正确处理栈溢出采用以下办法:

1)修正我们的程序,不要造成无穷递归或太深的递归。我们可以把某些递归代码非递归化,例如那个经典的 qsort ,最好就用非递归的算法来实现,就比较皮实一点。

2)修正我们的程序,不要定义过大的局部变量,特别是在定义大结构、大数组时要格外小心。有时我们可能会用 _alloca() 这样的特殊函数直接在栈上分配空间,更要多加注意。可以定义成static

3)利用编译器的特性,将进程允许的栈大小设置得大一些。例如可以采用 MSC 中的 /STACK 参数开关。

4)对于那些还可能导致栈溢出的代码,采用 Microsoft 的结构化异常处理或标准的 C++ 异常处理机制,结合 _resetstkoflw() 进行处理。当然了,要是不嫌麻烦,我们也可以自己探测所用栈的大小,动态地检测是否可能导致栈溢出,以避免可能的异常。

 


Time Limit Exceeded    程序超过了题目的时间限制
Memory Limit Exceeded   程序超过了题目的内存限制

 

Presentation Error程序运行的结果是正确的,格式和错误

比如中间多了回车或者空格,请仔细检查程序的输出部分,离AC就差一点点啦!

 

Restricted Function    代码中使用了不安全的函数

Wrong Answer     程序不正确,一般认为是算法有问题

 

System Error   OJ内部出现错误。

Out Of Contest Time 超出比赛时间,比赛的时候才会出现。

 



最后愿大家不见红橙之见绿,道道AC,次次AK

 

 

 另附英文原版:

Waiting: Your program is being judged or waiting to be judged.

Accepted (AC): Congratulations! Your program has produced the correct output!

Presentation Error (PE): Your program's output format is not exactly the same as required by the problem, although the output is correct. This usually means the existence of omitted or extra blank characters (white spaces, tab characters and/or new line characters) between any two non-blank characters, and/or blank lines (a line consisting of only blank characters) between any two non-blank lines. Trailing blank characters at the end of each line and trailing blank lines at the of output are not considered format errors. Check the output for spaces, blank lines, etc. against the problem's output specification.

Wrong Answer (WA): Your program does not produce the correct output. Special judge programs will possibly return Wrong Answer in place of Presentation Error for simplicity and robustness.

Runtime Error (RE): Your program has failed during the execution. Possible causes include illegal file access, stack overflow, out of range in pointer reference, floating point exception, division by zero and many others. Programs that stay not responding for a long time (not consuming CPU cycles) may also be considered to have encountered runtime errors.

Time Limit Exceed (TLE): The total time your program has run for has exceeded the limit.

Each problem has two time limits - TOTAL TIME LIMIT and CASE TIME LIMIT. The former is the total time allowed for your program to deal with all input files. And the latter is the total time allowed for your program to deal with a single input file. Exceeding either one will lead to Time Limit Exceed. If you get Time Limit Exceed but find that your program has run for less time than is limited, your program must have exceeded that CASE TIME LIMIT.

Problems without a special demand on the time limit for a single input file will have its case time limit is trivially set as the same as its total time limit and the phrase "Case Time Limit" will not show up under the problem title.

Memory Limit Exceed (MLE): The maximum amount of memory that your program has used has exceeded the limit.

Output Limit Exceed (OLE): Your program has produced too much output. Currently the limit is twice the size of the file containing the expected output. The most common cause of this result is that your programs falls into an infinite loop containing some output operations.

Compile Error (CE): The compiler fails to compile your program. Warning messages are not considered errors. Click on the judge's reply to see the warning and error messages produced by the compiler.

No such problem: Either you have submitted with a non-existent problem id or the problem is currently unavailable (probably reserved for upcoming contests).

System Error: The judge cannot run your program. One example is that your program requires much more memory than hardware limitation.

Validate Error: The special judge program fails in checking your output, which means it may contain some bugs. If you get this result, please contact the administrator. (Of course, this also means your output is probably wrong).