IOI 2005 Competition Rules
Code of Conduct
These Competition Rules cover Competition Procedures and Judging Procedures.
Additions and changes to these rules will likely be made; intermediate
versions will be distributed electronically as they are available, and the
final version will be distributed at the first GA meeting of IOI 2005.
Delegation Leaders have the responsibility of ensuring that all members of
their delegation fully understand these rules and abide by them.
All of the tasks in IOI 2005 are designed to be algorithmic in nature.
Efficiency plays an important role in some tasks. Whenever efficiency of
an algorithm is important, certain correct but inefficient
approaches can score points for about 50% of grading inputs. Therefore, it
is worthwhile to attempt a task even if the contestant does not know how to solve
the largest possible test cases.
Tasks may be of the following types:
- Batch tasks
- Solutions comprise a single source file of a computer program which reads data
from standard input and writes an answer to standard output,
- Reactive tasks
- Solutions comprise a single source file of a computer program which
invokes procedures from a library provided by the organizers,
- Output-only tasks
- Solutions comprise a set of "output" data files.
Each submitted source program must be smaller than 100 KB and the
evaluation server must be able to compile it in less than 30
seconds. The executable code of the submitted programs must be smaller than
10MB. Submitted programs which do not meet these constraints will be
rejected by the submission system and the contestant will be notified.
If the memory limit is specified, it is the the limit on overall memory
usage including executable code size, a stack, a heap, etc.).
The source program provided by the contestant must be contained in a single source file.
The task statement will define:
- the input and output data formats,
- the input value ranges (when applicable),
- the resource limitations for the computations (e.g., CPU time, memory limitations),
- any other constraints on the program.
The source program
provided by the contestant must be contained in a single source file.
The task statement will specify:
- the parameters and results of library routines to be used (in all competition languages),
- allowed interactions,
- the resource limitations for the computations (e.g., CPU time, memory limitations),
- any other constraints on the program.
The competition might include tasks for which input data is given to
the contestant and the contestant is required to produce only the
output data as a solution. If the contestant writes programs to help
determine the output data, the programs must not be submitted with
the solution. The input data will be provided in ASCII text files. For
these tasks, the task statement will specify:
- the structure of the input and output files, and
- information on obtaining the full set of official input files.
Input and output data
In all tasks, input and output data consist of one or more lines, each
ending with an end-of-line character. Each line contains one or more
space-separated items. An item is a string of printable non-white-space
characters (ASCII code from 33 through 126). An item may represent an
integer or a general string; the meaning of each item will be given in the
The format and limits for input and output data will be specified
in the task description. The output data files should be formatted
strictly according to the task-specific instructions.
IOI 2005 begins on Thursday, August 18 (Arrival Day) and ends on
Thursday, August 25 (Departure Day). The First Competition Day is Saturday,
August 20, and the Second Competition Day is Monday, August 22. On each
competition day contestants will be given three tasks to complete in the
five hours from 9:15 to 14:15.
There will be a two hour Practice Competition on
Friday, August 19 from 9:15 to 11:15. The purpose of this practice round is
to familiarize all participants with the environment and procedures. The
practice tasks will be distributed in advance of the IOI and contestants are
encouraged to bring prepared solutions with them on CDs for submission
during the practice round. All contestants are required to take part in the
Practice Competition round.
In order to protect the confidentiality of the tasks, all direct and
indirect contacts and
communication between contestants and team leaders are prohibited between the
start of a GA Meeting where tasks for a competition day are presented
and the end of the five-hour round on the following day.
During this period the contestants are not allowed to communicate by any
means, direct or indirect, with anyone who attended the GA Meeting. The GA
Meeting participants are not allowed to communicate task-related information
to anyone not participating in the Meeting. The contestants and the GA
Meeting participants must obey any instructions which restrict their access
to specific parts of the IOI venue.
If a contestant violates the quarantine, he or she can be a subject of
disqualification. If some other person associated with a national delegation
violates the quarantine, then all contestants of that delegation can be
subjects of disqualification.
For their own sake, in order to eliminate any suspicion of cheating,
contestants and team leaders should not use mobile
phones and switch off all wireless facilities in all devices
during the quarantine.
Competition Equipment and Environment
All contest machines will be installed to dual-boot in Windows XP and Debian
- The following packages will be installed in Linux environment: KDE;
WindowMaker; web browsers: Firefox, Konqueror; editors: mcedit, joe, vim, kate,
kwrite, kdevelop, emacs, rhide; compilers: gcc ≥3.3, g++ ≥3.3, Free Pascal
≥1.0.10 with documentation; debuggers: gdb, ddd; STL documentation.
- In Windows, the following applications will be available: Internet Explorer,
Firefox, Notepad, VIM, Free Pascal ≥ 1.0.10 with IDE and documentation,
DJGPP v2 with RHIDE and SETEDIT, Dev-C++ ≥ 4.9, STL documentation.
In order to translate tasks, team leaders will be provided with computers
with a version of Microsoft Word 2003 Professional with some multi-language
support. In addition, some Ethernet ports will be available for leaders
In the competition room, blank paper and writing utensils will be
provided. On the competition days, contestants may not bring anything into
the competition rooms, but:
- reasonable jewelry,
- writing utensils,
- simple wristwatches,
- small mascots,
- English dictionaries, and
- English-to-your-mother-tongue dictionaries
Any attempt to bring any other item into the competition room will be considered cheating.
In particular, during competition rounds it is strictly prohibited to bring:
- any computing equipment (e.g., keybords, mice, calculators, organizers, PDAs, computers,
calculator or "data bank" watches),
- any books, manuals, written or printed materials,
- any data storage medium (e.g., diskettes, CD-ROMs, "pen drives,"
compact flash/smart cards, micro-drives),
- any communication devices (e.g., mobile phones, radios of any sort),
- wireless keyboards, wireless mice, or any other wireless input devices.
Any electronic or printed materials provided by the organizers
during the Competition Round may be used by the contestants (e.g., a
Users Guide to the Contest System, or any electronic documentation
or reference manuals provided in the installed contest environment
or on the provided Contest Server).
Starting the Competition
On the competition days, immediately, after breakfast ends, contestants
will be admitted to the competition rooms. All contestants must wear their
ID badges during the competition. Each contestant will have a pre-assigned room
and computer within that room; this information will be posted in the
morning of the competition day. Contestants should be in their seats by 9:10
(5 minutes before the competition starts). On the way to their computers,
contestants will be checked to verify that they are not bringing anything
with them into the competition rooms other than clothing, reasonable
jewelry, and simple wristwatches. Contestants must find their assigned
computer, sit down, and wait for the competition to begin without touching
- other competition materials including tasks.
The beginning of the competition will be marked by a start signal, after
which time the contestant may use any of the above items.
During the first hour of competition, contestants may submit written
questions concerning any ambiguities or items needing clarification in
the competition tasks. Questions must be submitted on the provided
Clarification Request Forms, expressed either in the contestant's
native language or in English. If required, delegation leaders will
translate their contestants' questions to English after they are
submitted and before they are sent to the Scientific Committee.
The Scientific Committee will respond to every question
submitted by the contestants. Since this might take some time,
contestants should continue working while waiting for the answer to
their questions. Most questions will be answered with one of "YES",
"NO", or "NO COMMENT"; contestants should phrase their questions so
that a yes/no answer will be meaningful. Contestants will not be
involved in or exposed to discussion regarding their questions.
However, in cases where the Scientific Committee feels that the
contestant does not understand the task statement, English text which
helps clarify the task may be added to the response, and if necessary,
translated by the contestant's Delegation Leader into the language in
which the question was originally posed.
The IOI competition takes place in a distributed environment in
which each competitor has his or her own workstation for development
and initial testing. Grading and evaluation take place on the
Competition Server, which provides a similar execution environment
to that of the contestant workstation.
Each competitor's workstation has both Linux and Windows installed;
the competitor may choose which operating system to run. Regardless
of which operating system is chosen, a common set of compiler and
development tools will be available. These tools are used to develop
solutions to the problems posed. There is no restriction on the
number of times a program may be edited, compiled, and run on the
The workstations will have network access to the Competition
Server, a web server which provides documentation, needed task data,
and facilities such as printing, backups, test execution, and solution
Facilities provided by the Competition Server are described in a separate
document which will acompany these Rules. Both these documents will be
available online on the Competition Server.
The workstations will not have access to each other and the
Internet. Any attempt to access another competitor's computer or the
Internet will be considered cheating.
After a contestant requests that a document be printed, the support staff
will deliver the printout to the contestant; contestants should not leave
their computer to find printouts. Printouts will be delivered as quickly as
possible, but large volumes can produce delays in delivery. The limit on
the length of a printed document is 10 pages. If a document to be printed is
longer, only the first 10 pages will be printed. On each competition day the
contestant can print at most 30 documents.
The Competition Server runs Linux, enforces memory and time limits, present
inputs data to the contestant's program, and capture the results.
A competitor may run his or her program in the judging environment
on a by using the TEST interface. To use this facility,
the competitor supplies a program and input data to the
interface. These are copied to the judge machine and executed. Results
are displayed using the interface. The TEST facility allows the competitor
to determine the exact behaviour of his or her program in the judge
environment with respect to compilation parameters, time and memory limits,
and so on. Because the TEST facility consumes shared resources, there
is a limit of 30 TEST submissions per task. Also, TEST submissions
will be disabled during the last 30 minutes of each day's competition.
Submitted input files can be compressed (in gzip or zip format) or not.
The size of an input file submitted in the uncompressed form must not exceed
100kB. The size of an input file submitted in the compressed form must not
exceed 50MB after decompression and 100kB before decompression. The test
execution system will compile and execute the program under Linux, enforcing
the resource limitations for the particular task. The first 100KB of the
standard output, execution time, and any applicable error messages will be
Once a competitor is reasonably satisfied with his or her solution,
he or she may submit it using the SUBMIT interface. Any task may
be submitted at any time; however, grading will take place only at
the end of the contest day. Therefore, if the competitor wishes to
submit an improved or corrected version of a solution, he or she may
do so by using SUBMIT again.
Because the SUBMIT facility consumes shared
resources, there is a limit of 30 submissions per task.
Contestants submit solutions to the Competition Server via a web browser.
For tasks which require output files as solutions, contestants submit
solutions in the form of a zip or tar-gzip archive of output files. Such an
archive contains only the cases solved by a contestant. He/she is not
obliged to submit a solution for each provided input text file. The
submission facility will validate the format of each output file submitted,
accepting only valid output files for grading.
For tasks that require programs as solutions, the
submission facility will accept C/C++ or Pascal programs, verify that the
program compiles and obeys the stated limits on source program size, executable
code size and compile time. The submission facility will then run the
program on the sample test case given in the task description, enforcing the
relevant run-time resource constraints. If the submission produces the
correct output, then the submission is accepted for grading; note that
acceptance only means that the compilation was successful (no compile
errors) and the program correctly solved the sample test case within the
resource constraints. In particular, it does not mean that the program would
obey the resource constraints when given different input.
Only the last accepted version for each task will be graded.
Contestants may ask the support staff for assistance at any time. The
staff members will not answer questions about the competition tasks,
but will deliver Clarification Request Forms and printouts, help locate
toilets and refreshments, and assist with computer and network
problems. The only manner in which contestants are allowed to access
the network is via web browser access to the designated Competition
Server; even running a single 'ping' command is strictly prohibited.
Contestants should never attempt to "fix" or "debug" or even "check"
computer or network problems themselves; instead, they should ask for
Ending a competition round
Three warnings of the end of a round will be given with:
15 minutes, 5 minutes, and 1 minute before the end of the round.
Each warning will be both verbal an written on a white-board.
The end of the round will be announced verbally. At the announcement
ending the round, contestants must immediately stop working and wait at
their desks without operating the computers or touching anything on
their desks. An additional announcement will be made instructing them
to leave their tables and exit the competition room.
At the end of each Competition Round, all items should be taken out
of the competition room, including the task statements; nothing of
value should be left in the competition room.
For tasks that require programs as solutions, the submitted source files
will be re-compiled under Linux, enforcing the source file size and
compilation time constraints. The following commands will be used
to compile solutions of tasks (say the task name is abc):
- For C - gcc -O2 -static abc.c -lm
- For C++ - g++ -O2 -static abc.cpp -lm
- For Pascal - ppc386 -O2 -XS abc.pas,
The grading system will then execute the
compiled program under Linux, enforcing the task-specific run-time resource
constraints. There will be a CPU run-time limit, and a limit on total memory
use. The actual limits will be specified in the task materials. If a
program exceeds its allotment of any resource, the program is terminated and
the test run is marked incorrect, without regard to any output produced.
Every test case consists of at least one test run. Every limit applies
independently for each test run. Points for a test case are awarded if and
only if all test runs of the test case are successful, i.e. no limits are
exceeded and the outputs produced are correct. Therefore, guessing the most
probable solution for a task (e.g. the word NO) does not pay off, since test
runs with such answers will be grouped into test cases with test runs with
more complex answers.
Programs submitted must not make any system calls other than
reading from standard input, writing to standard output
and clock functions. Upon termination, programs must always explicitly
return an exit code 0. Other exit codes will be interpreted by the
grading system as failures and no points will be awarded for the test case.
Submitted programs are not allowed to:
- access the network,
- open and create files,
- attack the system security or the grader,
- execute other programs,
- change file system permissions,
- read file system information,
- use external libraries (e.g. crt, graph).
All of the above actions are considered cheating, and may result in
Only work which has been submitted to and accepted by the grading system
will be awarded points.
At the end of each competition day, submitted solutions are judged
using data which conforms to the specification given in the problem
statement, but which is unkown to competitors during the competition.
Provisional grades, based on these tests, are delivered to team leaders'
mailboxes before 16:30. The judge data are made available electronically in
the contestant and translation environments. Contestants and team leaders
may use the contestant workstation to verify that the grades are assessed
A Team Leader may file an appeal by completing an appeal form, available
adjacent to the mailboxes, and submitting the completed form before 20:15
of competition day to the mailbox labelled "appeals." Every appeals will be
reviewed by the Scientific Committee and the team leader will be notified
the committee's decision. All appeals and their disposition will be
summarized at the final General Assembly meeting.
In the event that a mistake is discovered
in the grading of a task, every successful submission of that task will be
re-graded and re-scored whether or not the scoring of that submission has
been appealed. Note that re-scoring may result in a higher or lower score
for any contestant; should anyone's score change after grading results have
been distributed, new results will be printed and distributed to them.
Code of Conduct
- interfering with other contestants' activities,
- damaging the competition or evaluation facilities,
- accessing the network or any computer other then their own during a
competition round by any means other than pointing a web browser at the
internal Competition Server as directed,
- subverting the security of any computers (e.g., making any material
accessible to the network from their computer),
- interfering with the execution of the competition in any way,
- communicating in any way with anyone other than the competition staff
during a competition round (whether providing or receiving information
- or attempting to do any of the above
will be considered to be cheating and may result in disqualification.
Also refer to the list above of prohibited program actions
which are considered cheating and may result in disqualification.
Cheating will be taken very seriously and rules will be strictly
enforced. Any contestant who is cheating in any way will be immediately
disqualified, at the discretion of the International Scientific Committee.
It is of the utmost importance that team leaders speak to their contestants
about cheating, instructing and urging all contestants not to cheat,
explaining the relevant rules and verifying that all contestants fully