TCM/Time Rules
Submitted solutions are tested during the round. Contestants submit their solutions into the contest system with the help of the software provided. Before submitting a solution, the contestant chooses the compiler that will be used by the contest system, which runs on Linux, to compile the solution. Information about the compilers and their settings as well as the configuration of the testing servers can be found in the Compiler settings web page of the competition site.
Solutions are tested by running them against a set of test cases that is not available to the contestants and is the same for all contestants. A solution is considered accepted if it produces correct answers to all test cases in the given time and memory limits. Testing is run automatically, so solutions have to follow input and output formats described in the problem statement of each problem precisely. Unless written otherwise, all input data is supposed to be correct and satisfy all constraints mentioned in the problem statement.
The maximum execution time for any test case is specified in each problem statement. If a solution exceeds this limit on at least one of the test cases, this solution is considered incorrect.
When a solution is ready, the contestant submits it into the contest system for checking, and may then continue working on other problems.
Before submitting a solution to each problem for the first time, the contestant has to choose whether he or she wants to make the submission “open” or “blind”. This decision cannot be changed later. Results will be shown to the contestant immediately after a submitted solution has been tested.
After making an “open” submission, the contestant is informed whether his or her solution is accepted. If it is not, the contestant is also told the type of error and the index number of the failed test case.
Solutions that are “blind” submissions are tested on the sample test cases only (from the problem statement). If a solution doesn’t pass these test cases correctly, the contestant is told the type of error and the number of failed test case. If it does pass, the problem is considered to be preliminarily solved. Submitting further solutions to this problem becomes impossible. The final result of testing is announced after the end of the contest.
Outcome | Test number is provided? | For “open” submissions | For “blind” submissions | Possible reason |
---|---|---|---|---|
OK | No | The solution is accepted | The solution passed all sample test cases | The solution works correctly on the corresponding set of test cases |
Compilation error | No | Compilation of the solution failed | Compilation of the solution failed | 1. Syntax or semantic error in the solution 2. Solution language was chosen incorrectly |
Wrong answer | Yes | Incorrect output on one of the test cases | Incorrect output to one of the sample test cases | 1. A mistake in the solution 2. Wrong algorithm |
Presentation error | Yes | Output cannot be checked as its format doesn’t satisfy the requirements | Output to one of the sample test cases cannot be checked as its format doesn’t satisfy the requirements | 1. Incorrect output format 2. No output at all 3. Extra output |
Time-limit exceeded | Yes | The solution exceeded the time limit | The solution exceeded the time limit on one of the sample test cases | 1. A mistake in the solution 2. The solution isn’t efficient enough |
Memory limit exceeded | Yes | The solution exceeded the memory limit | The solution exceeded the memory limit on one of the sample test cases | 1. A mistake in the solution (eg.: infinite recursion) 2. The solution isn’t efficient enough |
Run-time error | Yes | The solution stopped working with a non-zero exit code | The solution finished working with a non-zero exit code on one of the sample test cases | 1. Runtime error 2. The solution doesn’t end with “return 0” in case of C/C++ 3. Non-zero exit code is manually specified |
In the case of Compilation error, the solution is not run against any test cases. In the case of Run-time error, Memory limit exceeded, or Time limit exceeded, output of the solution is not taken into account.
Consecutive submissions of the same source code made by the same contestant are ignored. If a submission was considered incorrect because of a compilation error, this submission is not taken into consideration when the total penalty time is calculated. “Blind” submissions that did not pass at least one sample test case are not taken into consideration either.
The sample test cases in the system always match the sample test cases from the problem statement in the same order.
Preliminary and final rankings of round
Contestants are ranked by number of solved problems. Contestants who solve the same number of problems are ranked by total penalty time.
Total penalty time is determined as the sum of time taken and “bonuses for blind submissions” for each accepted problem.
The time taken for a solved problem is the time elapsed from the beginning of the contest to the submission of the accepted solution, plus, if the submissions to this problem were “open”, 20 penalty minutes for each previously submitted incorrect solution.
If a problem is solved with a “blind” submission, the total penalty time is decreased by n seconds, where n = ((number_of_contestants_who_did_not_solve_this_problem) × (contest_length_in_seconds)) ÷ (total_number_of_contestants).
Total penalty time is calculated up to a second. Problems that have not been solved by the end of the contest do not add anything to the total penalty time (including penalty for incorrect submissions).
In the rankings, problems solved with an “open” submission are denoted by “+” followed by the number of incorrect submissions to this problem (if any). For example, the rankings contain “+” if the problem is solved on the first attempt, and “+2” if it is solved on the third attempt. Unsolved problems that have “open” submissions are denoted by “-” followed by the number of incorrect submissions to this problem. Problems that have a “blind” submission which passed all sample test cases are denoted by a question mark, “?”. The current rankings are displayed under the assumption that all “blind” submissions will be accepted.
After the end of the contest, all “blind” submissions are retested on the full set of test cases, which is the same as the set of test cases that was used for testing “open” submissions (“system test cases”). The results of this testing become the only results for these solutions.
In the final rankings, unlike the preliminary rankings, problems that have a “blind” submission which passed all system test cases are denoted by a green tick (✔), and problems which have a “blind” submission which failed on at least one system test case are denoted by a red X (✗).