GRADING ENVIRONMENT

IOI 2025 Grading Environment

Grading System

The contest will use CMS (Contest Management System) as the grading system.

Grading is performed on Quipus All-in-One Desktop computers with the following specs:

  • Intel Core i9-13900H
  • 16 GB DDR4
  • 1 TB NVMe SSD

NoteGrading servers are identical to contestant machines, but with Turbo Boost, Hyper-Threading and CPU scaling disabled, so CMS timings may differ slightly from local runs.

Submitted C++ source files are compiled in a Linux environment using GCC 13.3 or newer – the same compiler version installed on contestant machines.

NoteRecent GCC versions may consume excessive resources when compiling code that allocates dynamic data structures (e.g., a vector) with a large constant size. This may cause compilation to exceed resource limits and fail.

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++20 -O2 -pipe -static -s -o task grader.cpp task.cpp

NoteThe compilation scripts provided to the contestants use a similar compilation command, except that they do not include -DEVAL and use the -g flag instead of -s.


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()

However, other violations of the protocol – particularly those involving grader procedure calls – should generally result in the solution being judged as incorrect. This will be reported in CMS as follows:

  • Output isn’t correct: Invalid argument – a grader procedure was called with invalid arguments
  • Output isn’t correct: Too many calls – a grader procedure was called too many times

Output-Only Subtasks

If a task includes output-only subtasks, a single submission may contain:

  • At most one C++ source file
  • Any number of output files (including none), with at most one file per output-only subtask

Submissions are evaluated according to the following rules:

  • For each programming subtask, the C++ source file (if provided) will be compiled and graded. If no source file is included, the score for that subtask will be 0.
  • For each output-only subtask:
    • If an output file specific to that subtask is included in the submission, it will be graded.
    • Otherwise, if a C++ source file is present, the compiled program will be executed, and its output will be graded for that subtask. The required subtask-specific protocol that the program must follow is described in the task statement.

NoteProgram execution is subject to the time and memory limits given in the grading system, regardless of the subtask type.


Task Attachments

There is an attachment package that you can download from the contest system, containing:

  • Sample graders
  • Sample implementations
  • Example test cases
  • Compile, run, and submit scripts

Each task has a subtask with index 0 which is worth 0 points. Unless specified otherwise in the problem statement, 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++20 compiler option.

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].
  3. 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).
  4. 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 through the CMS web interface, contestants may also use the submission script included in the task's attachment package. Further details about the manual submission process will be provided later.