Competition rules (approved by GA)
IOI 2012 Competition Rules
These Competition Rules cover Competition Procedures and Judging Procedures. This draft may be revised to address omissions or inconsistencies, but will not change substantially. The final version will be presented at the first GA meeting of IOI 2012.
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 2012 are designed to be algorithmic in nature. All tasks will be divided into several subtasks specifying
- time and memory limits,
- optimality criteria,
- simplifying assumptions,
- other amendments to the task specification.
All submissions will be subject to general time and memory limits. The CPU and memory limits will be at least double what is needed.
Contestants are advised to submit solutions that will meet all the limits of a subtask.
Tasks may be of the following types:
- Programming tasks: Solutions comprise one or more procedures implemented in one or more source files, which may be tested and submitted using the CMS. An interface will be given for each procedure to be implemented by the contestants, and for each procedure supplied by the grader. Skeleton implementations for all tasks will be available on contestant workstations. The grader may read input data and specifications from a file, but the submitted procedures do not access this file directly: all parameters and results are communicated between the grader and the submission by procedure parameters and results.
Some tasks could require the submission of procedures written in different files, as specified in the task statement. In such cases, the procedures contained in different files must not communicate other than through the interfaces specified in the task statement. Shared variables, file access and network access are forbidden. The skeleton grader implementation given to contestants may not enforce these restrictions, but the official grader will. Any deliberate attempt to defeat the official grader's enforcement of the restrictions may subject the contestant to disqualification. On the other hand, contestants may modify the skeleton grader on their workstation as they see fit.
- Output-only tasks: Solutions comprise a set of “output” data files. The files must be placed in a task-specific directory; the CMS is used to submit them all at once to the grader.
For every task, CPU and memory limits will be specified. The CPU limit will be specified in seconds, as measured by the operating system. The memory limit is on the overall memory usage including executable code size, stack, heap, etc. In general, these limits will be at least double those required by the expected solution.
Submissions must not perform explicitly input and output operations as data is exchanged through the interfaces specified in the task statement. In particular, any direct access to any file, including standard input and standard output, is forbidden. Moreover, submissions are forbidden from invoking system calls directed at breaking the rules above. (Note that writing to stderr is allowed.) In particular the contestants cannot, by any means, do the following: reading or writing files, accessing the network, forking the process, tampering with the grading system. Any contestant who attempts to compromise the system may be subject to disqualification.
The source program provided by the contestant must be contained in one or more source files as specified in the task statement. The task statement will define:
- the task to be solved,
- the interfaces to the procedures to be implemented and procedures implemented by the grader,
- the input value ranges (when applicable),
- the resource limitations for the computations (e.g. CPU time, memory limitations),
- for subtasks where partial scores are possible, the criteria by which these scores are calculated,
- any other constraints on the program.
The contestant workstation will contain one folder for each programming task, which will contain the necessary interface files, a sample grading program, and a skeleton implementation of the required source files which exercises the interface but does not correctly solve the problem.
The CMS is used to submit all required files for grading.
The competition may 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 are not graded with the solution. The input data will be provided in ASCII text files. For these tasks, the task statement will specify:
- the task to be solved,
- the structure of the input and output files,
- the names of the input files,
- the names of output files,
- grading criteria.
The CMS is used to submit all required files for grading.
There will be two competition days. On each competition day contestants will be given three tasks to complete in the five hours. Contestants will have access to detailed feedback for the entire set of the official test cases using the CMS. The schedule will be published on the official competition web site.
There will be a two-hour Practice Competition prior to the first competition day. The purpose of this practice round is to familiarize all contestants with the CMS environment. The practice tasks will be published before the IOI. Contestants may bring printed solutions to the practice tasks, on paper only. However, all contestants are encouraged to take part in the Practice Competition without bringing printed material, to better simulate what happens during each competition day.
In order to protect the confidentiality of the tasks, all direct and indirect contacts and communication between contestants and delegation leaders are prohibited between the moment where tasks for a competition day are presented to the members of the GA 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 any member of the GA or anyone who has seen the tasks. The GA members are not allowed to communicate task-related information to anyone who may not attend GA meetings. The contestants, the GA members and anyone else who has had access to the tasks 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 subject to disqualification. If some other person associated with a national delegation violates the quarantine, then all contestants of that delegation may be subject to disqualification.
In order to eliminate any suspicion of cheating, contestants and team leaders should not use mobile phones and should switch off all wireless facilities in all devices during the quarantine.
Competition Equipment and Environment
All contest machines will be installed to boot in Linux. The following packages will be installed:
- distribution: Ubuntu 12.04 LTS i386, Gnome Classic;
- web browsers: Firefox;
- editors: joe, vim, kate, kwrite, eclipse-cdt, emacs, lazarus, gedit, nano, scite, codeblocks, geany, fp
- compilers and interpreters: gcc 4.6, g++ 4.6, fpc 2.4, python 2.7.3, ruby 1.8.7
- debuggers: gdb, ddd
- Documentation for Pascal, C, C++, STL.
- Laptop: Acer TravelMate 5744, display 15.6″HD 16:9 WXGA
- CPU: Intel i3-380M 2.53 GHz 3 MB L3 cache
- RAM: 4GB DDR3-1066/PC3-8500
- User disk space: at least 100 GB
- USB international US-layout keyboard, USB mouse (the laptop keyboard is in Italian)
As an experiment this year’s contest will be run as a paperless contest, to save on the large amount of wasted paper. Here are some implications.
- Contest. Each contestant will have on-line access to the English description of the official tasks, the auxiliary information, and all their translations, in electronic format (PDF). Do not panic: at any time during the contest, the contestant can still print on request as in the past. Also, sketchpad, question form, ID and password to connect to the CMS will be still on paper.
- Translation. All the team leaders will have access to Mediawiki (MW) during the translation session since MW supports all the needed languages. The English description of the official tasks will already be available in the MW format, and there will be an interface to help in the translation job. In particular, the subsequent textual modifications to the tasks will be easily identified to speed up the translation process, with the possibility of generating the PDF that the team leaders have to officially validate. It is still possible to print on request as in the past but now there is no more need to produce and deliver printed copies of the translation.
- Problem discussion. The meeting will be held in the translation room, so the same conditions for translation apply here. Minor and major objections will be handled electronically as well.
- Daily news: they will be available on-line in PDF from this Web site.
In the competition room, blank paper and writing tools will be provided. On the competition days, contestants may not bring anything into the competition rooms, except for the following items under the proviso that they cannot transmit or store any data in electronic or printed format (other than the purpose for which they have been designed):
- reasonable jewelry,
- writing utensils,
- small mascots,
- English dictionaries.
Watches cannot be brought since timing is provided by the CMS. If a contestant wants to bring a keyboard, small mascots or English dictionaries to the competition, these must be submitted to the technical staff during the practice competition day. Any of these will be checked and, if cleared, will be given to the contestant in the first competition day. After the first competition day, the contestant must leave these items on his or her workstation if he or she wants to use them during the second competition day. Once again these will be checked and, if cleared, will be given to the contestant in the second competition day. After the second competition day the contestant must take any of these items with him or her.
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., keyboards, 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).
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).
Starting the Competition
On the competition days, immediately after breakfast ends, contestants will be admitted to the competition hall. All contestants must wear their ID badges during the competition. Each contestant will have a pre-assigned workstation; this information will be posted in the morning of the competition day. Contestants should be in their seats by at least 5 minutes prior to the start of the competition. On the way to their computers contestants will be checked to verify that they are only bringing allowed items into the competition hall (see Competition Supplies section). Contestants must find their assigned computer, sit down, and wait for the competition to begin without touching any:
- other competition materials.
The beginning of the competition will be marked by an audible start signal, after which the contestant may use any of the above items. During the competition, the transcript of audio announcements will be also shown on displays installed in the competition site.
During the first two hours and a half of competition, contestants may submit written questions concerning any ambiguities or items needing clarification in the competition tasks. After this period comments may be received, but no answers will be given. Questions and comments 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 into 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. Contestants should phrase their questions so that a yes/no answer will be meaningful. Questions will be answered with one of the following:
- “ANSWERED IN TASK DESCRIPTION (EXPLICITLY OR IMPLICITLY)” – The task description contains sufficient information. The contestant should read it again carefully.
- “INVALID QUESTION” – The question is most likely not phrased so that a yes/no answer would be meaningful. The contestant is encouraged to rephrase the question.
- “NO COMMENT” – The contestant is asking for information that the Scientific Committee cannot give.
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.
Contest Management System (CMS)
The IOI competition takes place in a distributed environment in which each competitor has his or her own workstation for development and initial testing. There is no restriction on the number of times a program may be edited, compiled, and run on the workstation. The workstations have network access to the CMS and facilities such as printing, test execution, and solution submission. The workstations have access to neither each other nor the Internet. Any attempt to access another competitor’s computer or the Internet is considered cheating. Attempts to tamper with the CMS, such as probing the server with customized URLs, is also considered cheating.
Grading and evaluation take place on the CMS, which provides a similar execution environment to that of the contestant workstation. The hardware, the operating system and the compilers for scoring tasks are the same as those of the contestant’s workstations. The CMS is open-source Python code available at https://github.com/cms-dev/cms (the version actually employed for the contest could slightly differ from that in the URL).
Contestants are only allowed to print text files or PDF files during the competition. After a contestant requests that a document is 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 very large volumes can produce delays in delivery.
Contestants may print at most 128 pages on each competition day. Delivery of printouts will be disabled during the last 15 minutes of each competition day.
Contestants must submit their solutions by using the CMS. The appropriate task name and submission files are determined by the current directory (folder). Participant workstations will be pre-configured with such a directory for each task.
Solutions for tasks may be submitted at any time. However, contestants may submit at most once per task per minute.
For programming task, the programming language used by the contestants is determined based on the solution file extension:
- Pascal – *.pas,
- C – *.c,
- C++ – *.cpp.
Each submitted source program must be written in C, C++ or Pascal, it must be smaller than 100 KB, the evaluation server must be able to compile it in less than 10 seconds and at most 256 MB of memory. No other extensions different than the ones listed above will be run.
For output-only tasks, the file extension of each output file must be .txt.
Contestants may submit their solutions at most 64 times per task, unless otherwise stated in the task description.
Contestants use the CMS to view the status of their submissions and get a short report on the compilation errors of their source code. For all tasks, detailed feedback is available for a limited number of submissions. If the source code is successfully compiled, detailed feedback will inform the contestant whether or not each subtask has been solved, and the score awarded.
If the subtask is not solved, summary information from the CMS will name the test input file for which the submission failed, and the reason the task subtask was not solved:
- Output is not equal to expected output
- Run-time error
- Output limit exceeded
- CPU limit exceeded
No information on the actual data, the output produced by the contestant solution or any other execution details will be given to the contestant.
The contestant may deduce from the feedback his or her provisional score for the task. However, there is a small chance that the score may change due to appeals, or indeterminacy of the contestant’s submission. Indeterminacy may arise intentionally due to the use of pseudo-random number generators, or unintentionally due to programming bugs or marginal running time. Submissions may be re-evaluated many times, and the final score will be that yielded by the final evaluation.
When a task is submitted, it will appear immediately in the system, but there may be a few minutes delay before it is graded. Once it is graded, the contestant will be able to view summary results on a few simple “public” tests. If these results are satisfactory, the contestant may release test the submission. This shows the results of the submission on the official tests for all subtasks. To release test a submission, it is necessary to forfeit a release token.
Contestants will be given two release tokens per task for each 30 minutes period.
Tasks are graded whether or not they are “release tested.” If a contestant runs out of tokens, he or she will not be able to obtain feedback, but can continue to submit, and the submissions will count. The score for each task will be the maximum of any released submissions and the last submission, whether the last submission is released or not.
For programming tasks, contestants may run their programs in the evaluation environment. Contestants must submit the same files they would provide for a normal submission and the input file in the format described in the task statement. It is not needed to submit any other source file required to compile the program (they will be provided by the CMS). Testing in the CMS will execute the program, enforcing the resource limitations for the particular task. The source code cannot exceed 100 KiB, and its compilation must take at most 10 seconds and use at most 256 MiB of memory. The provided input file is presented to the program and takes at most 5 MiB. The first 100 KB of output (without error stream) is captured. The running time, the memory usage, the captured output and any applicable error messages will be displayed.
Testing allows the contestant to determine the exact behavior of his or her program in the evaluation environment with respect to compilation parameters, time and memory limits, and so on. However, since input and source files are provided by the contestants, the result may not be exactly the same as in the real grading environment.
Contestants may submit a testing request at most once per task per minute, and the total number of these requests is at most 32 per task.
Contestant scores will be available on a scoreboard that will be available to local and Internet spectators. The scoreboard will not be available to contestants.
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 the CMS: even running a single ‘ping’ command is strictly prohibited and may lead to disqualification!
Contestants should never attempt to “fix” or “debug” or even “check” computer or network problems themselves; instead, they should ask for assistance.
Ending the Competition
Three warnings will be given at 15 minutes, 5 minutes, and 1 minute before the end of the competition. Each warning will be given by an audible signal. The end of the competition will be announced both verbally and by an audible signal. At the announcement ending the competition, 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 the first competition, any previously submitted items a contestant would like to use during the second competition should be left at the workstation. All other items should be taken out of the competition hall, including own printouts. At the end of the second competition, contestants should remove all items including their mascots and dictionaries or any other previously submitted item; nothing should be left behind.
For output-only tasks, output files will be submitted as described above and scored as described in the task description.
For tasks that require programs as solutions, the submitted source files will be compiled under Linux, enforcing the source file size, and compilation time and memory limits.
The final score for each task will be the maximum of the following, rounded to the nearest integer:
- The sum of the scores of the subtasks for any released submission
- The sum of the scores of the subtasks for the last submission, whether the last submission is released or not
Contestants must use only the workstation and account assigned to them on each competition day. In particular,
- contestants must not attempt to submit illegal programs as discussed above, nor try to tamper or compromise the grading system,
- contestants must not attempt to gain access to root or any account other than the one assigned to them,
- contestants must not attempt to store information in any part of the file system other than the home directory for their account or the /tmp directory,
- contestants must not touch any workstation other than the one assigned to them,
- contestants must not attempt to access any machine on the network, other than to submit tasks and to view submission results,
- contestants must not attempt to reboot or alter the boot sequence of any workstation.
All of the above actions are considered cheating, and may result in disqualification.
Submitted solutions are evaluated using data which conform to the specification given in the problem statement, but which are hidden from competitors during the competition.
Provisional grades, based on these tests, are available immediately to competitors. The judge data will be made available electronically in the competition area after the competition as well. Contestants and team leaders may use the contestant’s workstations to verify that the grades are assessed correctly.
A Team Leader may file an appeal by completing an Appeal Form, available near the mailboxes, and submitting the completed form to the mailbox labeled “Appeals” at least 30 minutes prior to the final GA meeting of that competition day. Every appeal 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 GA meeting of that competition day.
In the event that every submission of a task should be re-graded and re-scored as a consequence of an accepted appeal, 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 published, new results will be published again.
After the second Competition Day and before the IOI Awards Ceremony the medal distribution is determined by an automatic procedure, based on the number of points the contestants achieved. The medal awards are uniquely determined by the following rules:
- The score necessary to achieve a gold medal is the highest score such that at least one twelfth of all contestants receive a gold medal.
- The score necessary to achieve a silver medal is the highest score such that at least one fourth of all contestants receive a silver or a gold medal.
- The score necessary to achieve a bronze medal is the lowest score such that at most one half of all contestants receive a medal.