top of page

IOI 2024 Grading Environment

Grading System

The Contest Management System (CMS) will be used as the grading system.
The exact commands used for compilation will be shown on the grading system. With the exception of certain task types, the compilation command will generally be of the following format:

/usr/bin/g++ -DEVAL -std=gnu++17 -O2 -pipe -static -s -o task grader.cpp task.cpp

Note that the compilation scripts provided to the contestants use an analogous compilation command, except that they do not contain -DEVAL.

 

Grading is performed on Lenovo G2 Desktop computers with the following specs:
     - Intel Core i5-10400 (2.90GHz) 6 Cores
     - 8 GB DDR4
     - 512 GB SSD
Note that the grading machines are different from contestant machines.

You may make up to 50 submissions for each task, and you have to submit exactly one file in each submission.

​​

Task statements

Task statements use the following C++ types:
       - bool
       - int
       - long long
       - std::vector<X>
       - std::pair<X, Y>
where X and Y are types from the above list.

Task attachments

There is an attachment package that you can download from the contest system, containing sample graders, sample implementations, example test cases, and compile, run, and submit scripts.

Each task has a subtask with index 0 which is worth 0 points. The test cases for this subtask are the same as the sample test cases included in the task statement and in the downloadable attachment.

When you test your code on your local machine, we recommend you to use the scripts from the attachment packages. Please note that we use the -std=gnu++17 compiler option. However, when submitting a program you may choose it to be compiled with an -std=gnu++20 option instead.

 

Protocol violation

A contestant may receive a “Protocol Violation” feedback if their program does not follow the correct protocol described in the problem statement. This typically happens in the following situations:
       - Reading from standard input or printing to standard output
       - Calling exit()

Note: an earlier version of IOI’24 Contest Rules mentioned that calling a grader procedure with invalid arguments may result in “Protocol Violation” feedback. This will not be the case. Instead, we use the rules outlined below.

Other violations of the protocol described in the problem statement are reported in CMS as follows:
       - Calling a grader procedure with invalid arguments → Output isn’t correct: Invalid argument
       - Calling a grader procedure too many times → Output isn’t correct: Too many calls

 

Sample graders

Sample graders provide a basic mechanism for running your solution. However, in many cases they are simpler than the graders used to judge your solution, e.g., they often simply print the answer of your solution without verifying its correctness.

When testing a program with the sample grader, your input should match the format and constraints from the task statement, otherwise, unspecified behavior may occur. Every two consecutive tokens on a line are separated by a single space, unless another format is explicitly specified.

The sample grader input and output format are described in a symbolic way. Consider an example:

      N        M
      A[0]      A[1]    …    A[N-1]
      P[0]      Q[0]
      P[1]        Q[1]
      …
      P[M-1]  Q[M-1]

 

In this example:
     1. The first line contains the values of N and M separated by a single space.
     2. The second line contains N space-separated values, giving the values of A[0], …, A[N-1].

        Important: this symbolic notation does not mean that there are at least 3 numbers in the line. We can have for example N=1 (there is a                single value in the line) or even N=0 (the line is empty).
     3. The next M lines contain pairs of values arrays P and Q, which are of length M. As above, we may have M=0 or M=1.

 

If a sample grader procedure call violates some of the constraints in the task statement, the sample grader may print an error message and terminate immediately. Unless specified otherwise, the error message is one of the following:
    - Invalid argument - a grader procedure was called with arguments, which violate a constraint provided in or following from the task

       statement.
    - Too many calls - a grader procedure was called more times than the limit provided in the task statement.


Note that the contestants can inspect the sample grader source code to see what triggers this error and/or modify the sample grader to print more information.
 

Alternative submission mechanism

In addition to submitting solutions using the CMS web interface, contestants may also use the submit-cpp17 or submit-cpp20 script supplied in the task package (or just submit for output-only tasks). The script is called with a single parameter: the name of the source file they want to submit. The script then attempts to submit online using the CMS. If it succeeds, the solution is visible in the CMS web interface with appropriate feedback. If it fails for whatever reason (including timeout), the submission is recorded offline on the contestant’s machine.


When the contest is over, the scientific committee collects all the locally recorded submissions and adds them to the CMS. They are added one by one in chronological order, so in case the contestant exceeds the maximum number of submissions allowed for the task, online submissions take precedence over offline ones and earlier offline take precedence over later offline.
 

bottom of page