IOI will provide a tool called RunC to compile, link, and test the task solution along with the necessary grader components. RunC may be invoked from the command-line, or using hotkeys from the gedit text editor. The use of RunC is not mandatory -- the gcc, g++ and fpc commands are available should the contestant wish to use them. However, the scoring system will use RunC, and we believe contestants will find it convenient to use RunC for development and testing.
At IOI 2010, RunC will be installed on every contestant workstation.
For practice, the latest version of RunC may be installed on Linux, or MacOS or Cygwin/Windows. To install RunC, type
wget -N http://plg1.uwaterloo.ca/~gvcormac/RunC-IOI/RunC-latest.sh sh RunC-latest.sh sudo ln -s ~/.RunC/runc /usr/bin(You can also download a local version of RunC.)
If you want the ``lite'' version of RunC (just the command line without the gedit plugin) perform the following three steps:
wget -N http://plg1.cs.uwaterloo.ca/~gvcormac/RunC-IOI/RunCcmd-latest.sh sh RunC-latest.sh sudo ln -s ~/.RunC/runc /usr/bin(You can also download a local version of lite RunC.)
The RunC tool is used to build the program and to run it on a suite of tests. A submit command (also available as a gedit plugin) is used to submit the program for scoring. Results and scores for submissions are viewed using a web interface.
The specification for task guess requires the contestant to implement a function play in the file player.c or player.cpp or player.pas. The mainline program, called grader.c or grader.cpp or grader.pas, is supplied by IOI.
runc grader.c runc grader.cpp runc grader.pasAlternatively, you may specify any file that is part of the program, instead of grader.c. runc will automatically compile all necessary files. Or you may compile the program manually using gcc, g++ or fpc.
Ctrl-RThat is, hold down the Ctrl key, and press R. Please see the illustrated RunC tutorial for more information.
Here is an example of what you will see, either on your terminal or in a message panel of gedit:
$ runc grader.c Compiling grader.c grader.h player.c player.h Running grader.c -- input from grader.in.1 -- output to grader.out.1 Program has finished. No runtime errors. Running grader.c -- input from grader.in.2 -- output to grader.out.2 Program has finished. No runtime errors. Running grader.c -- input from grader.in.3 -- output to grader.out.3 Program has finished. No runtime errors.In general, test input files must be in the task directory and named grader.in.1, grader.in.2, and so on. Any file matching the pattern grader.in.* may be used. These files supply parameters and input data to the grader, which in turn uses them to call the contestant's solution. The grader outputs summary results to the corresponding file named grader.out.*.
Note that the grader program, not the contestant's solution, does all input and output. The contestant's solution receives and returns all data by procedure calls. Contestants are welcome to modify the grader or the test files as they wish, in order to test their solutions. Note that the sample grader implements the required interface, but does not necessarily enforce all of the constraints given in the task specification. Furthermore, the sample test cases are not exhaustive. The official grader and test cases are not available to contestants.
If there exists a file matching the pattern grader.expect.*, it will be compared automatically to its counterpart grader.out.* and an error reported if they differ. For example,
$ runc grader.c Compiling grader.c grader.h player.c player.h Running grader.c -- input from grader.in.1 -- output to grader.out.1 Program has finished. No runtime errors. Output is equal to grader.expect.1 Running grader.c -- input from grader.in.2 -- output to grader.out.2 Program has finished. No runtime errors. Unexpected output ... see grader.check.2
submit grader.c submit grader.cpp submit grader.pas submit solution.txt for output-only tasks
Ctrl-J
There are two types of results:
The test results will indicate pass or fail. For failed tests, the information available from RunC will be shown. This information will contain one or more of: