Time-Limit Exceeded error

From EjudgeWiki
(Redirected from Time-Limit Exceeded)

Navigate: Main page/Система ejudge/Использование/Вердикты тестирования/Ошибка превышения лимита времени

Английское название: Time-Limit Exceeded, TL

This error is diagnosed by the testing system when the program under test runs on one test longer than specified in the task constraints.

When calculating the running time of the program under test, only processor time is taken into account (that is, the sum of the time spent in user mode and in kernel mode). This makes it possible to practically avoid the influence of runtime fluctuations that can occur in a multi-processor system.

Traditionally, the time limit for a task is set in seconds per test, but the ejudge system allows time to be set in milliseconds as well.

When the program under test is running, it is possible that the program does not consume processor time. For example, the program is trying to read input from standard input instead of reading from a file, or it makes some system call like sleep. In this case, the limit on processor time does not allow to kill the process in a reasonable astronomical time.

Different testing systems solve this problem in different ways. In the ejudge system, the problem is solved by limiting the maximum astronomical time (see. astronomical time) for the program to work (see max_real_time_limit). It is recommended to set the astronomical time limit several times larger than the CPU time limit. If the astronomical time limit is exceeded, the program under test is also removed from execution with a time limit exceeded diagnostic.