IOI'95: Competition Rules

[ IOI Home page ] Competition Rules


To the Competitors

Competition Days

IOI'95 takes place from Monday June 26 (opening) to Sunday July 2 (closing). Wednesday and Friday are competition days. On each of these days you have to complete three informatics tasks in five hours, from 11:00 to 16:00.

On the first day, you get two programming tasks and one new kind of task (see below). On the second day, you get three programming tasks.

Competition Equipment

You will have a computer of your own for the entire duration of the competition. The computer is a Tulip Vision Line with a 75 MHz Pentium processor, a standard U.S. keyboard, and a mouse. It runs MS-DOS 6.22 (U.S. version).

Print diskettes (see below) and blank writing paper will be available. You may bring pens, pencils, and erasers. You may NOT bring any other aids of your own, such as program disks, calculators, manuals, or books.

Programming Languages

The following three programming languages are available on each computer: All of the packages are fully installed including help files and examples.

Directories and Execution Path

On the hard disk of your computer you find the following directories: The execution path `%PATH%' is set to cover all three programming languages.


There will be practice computers that are exactly the same as the competition computers. They are also configured the same way. Before the meeting on Tuesday morning, the team leaders will have an opportunity to inspect the competition rooms.

New Task

For the new task, you do not need a computer. The task concerns an informatics problem involving some kind of `program' written in a new `language' that is unfamiliar to you. This language is documented informally.

The subtasks test your ability to read and understand this language, to understand the problem it is used for, to solve the problem, and to write in this language. Your answers do not involve natural language. You may have to fill in some tables, answer some multiple-choice questions, write some small program fragments, etc.

This may sound rather vague, but the rest must remain a surprise.

Programming Tasks

The programming tasks at IOI'95 are intended to be of an algorithmic nature. That is, the focus is on designing correct and efficient algorithms. However, to enable objective judging, you are asked to write your programs in any of the three programming languages mentioned above, and to compile them into stand-alone executables. This means that, besides algorithm design, implementation aspects also play a role.

We emphasize that the programming tasks can all be solved in `standard' Pascal, C++, and Basic. No special features of the programming packages are needed, except possibly for elementary input-output (examples are given separately: batch program and reactive program) and 32-bit integers (see below).

In particular, the following features will NOT play a role in the programming tasks: graphical output, mouse input, advanced string and file manipulation, advanced numeric processing, DOS calls, libraries, objects, overlays, etc. We will keep i/o simple, allowing you to concentrate on the algorithmic details.

You should be familiar with the programming package(s) of your choice. The ability to use the Integrated Development Environment (IDE), in particular the built-in editor and compiler (and, possibly, also the debugger), may be helpful. Some knowledge of compiler options may also be of an advantage. Furthermore, you should be able to use MS-DOS for such things as executing a program, changing the working directory, copying files onto diskette, etc.

Differences with IOI'94

The programming tasks of IOI'95 are similar to those of IOI'94, except that:
  1. There can be multiple input files, instead of just one.
  2. Input files can be too large to read into main memory completely.
  3. Tasks can involve `reactive' programs that have an input-output `dialog' with their environment, instead of `batch' programs using disk files.

32-bit integers

A 32-bit integer variable v is introduced by
var v: longint;  { in Turbo Pascal }
long int v;     // in Turbo C++
DIM v AS LONG    ' in QuickBasic

Input data

Reactive programs should read their input data from standard input, normally connected to the keyboard.

Batch programs should read their input data from ASCII text files. This is the case even if the program will need a single value. The names of the input files are given in the task description, for example, `INPUT.TXT'. Batch programs must not read from the keyboard.

You may always assume that the input data agrees with the task description. You do not have to validate the input data in your program.

When we speak of `a line of data', this includes a terminating end-of-line. The structure of the input is always such that you do not have to worry about end-of-file conditions.

Input data consists of a sequence of items. An item is either an integer or a non-empty character string consisting of letters (`a' to `z' and `A' to `Z') and/or digits (`0' to `9'). Items are separated by either a single space character or a single end-of-line. A string is always on a line by itself.

Example input files are provided for all tasks, both in the task description and the task directory. The example file for INPUT.TXT is called INPUT-0.TXT, etc.

Output data

Reactive programs should write their output data to standard output, normally connected to the screen.

Batch programs should write their output data to the ASCII text file named `OUTPUT.TXT'. Batch programs must not write to the screen.

Like input data, output data also consists of a sequence of items separated by spaces or end-of-lines (we prefer one, but you may write more than one if you cannot avoid that). The output should be formatted exactly as shown in the task description. Never add output of your own.


Some programming tasks are divided into subtasks. Points are awarded per subtask and added. Each subtask involves a part of the output data. If you do not know how to solve a subtask, then your program should still write appropriate output for that subtask (make a guess). The judging software cannot properly evaluate incomplete output.

Programs, test data, and time limits

For each task there is a task directory whose name is given in the task overview. If TTT is the name of the task directory, then you should produce a stand-alone executable file named TTT.EXE in that directory.

Judging of a program involves several `test runs' with secret input data. A test run for a batch program consists of the following steps:

  1. Input data is put in the task directory.
  2. Your program is executed in its task directory without command-line parameters.
  3. If your program terminates within the time limit, then the output is checked; otherwise, it is aborted and output is not checked.
For each task, the task overview gives an execution time limit that applies to every test run. The points collected for each test run are added to give your final score for that task.

Efficiency plays an important role in some tasks. Whenever efficiency is important, we will also include at least one test run where the input is such that a correct but inefficient program can also score some points. Therefore, it pays to work on a task even if you do not see how to make the `best' program.

Starting the Competition

When you enter the competition room, your computer will already have been switched on. The keyboard is on top of the monitor and the competition tasks are inside an envelope underneath the keyboard.

Do NOT put the keyboard on your desk or open the envelope until the start signal is given. The envelope contains a one-page task overview and descriptions for three task. You also find a condensed version of these competition rules on your desk.

The task overview tells about names of directories, programs, and input/output files; points; time limits; etc.

For each task you get two descriptions: one in English, the other translated into your native language by your team leader. All relevant figures and examples in the English original are numbered. The translated versions should refer to these figures by their number; captions may be translated.


During the first hour of the competition (11:00--12:00) you may ask questions concerning (alleged) obscurities in the competition tasks. These questions will be answered with `Yes', `No', or `No Comment' only.

You can submit questions on a special form in English or in your native language. In the latter case, the question will be translated into English by your team leader. The Scientific Committee will answer every question, but this may take a while, so keep on working.

At all times, you can ask the room supervisors for assistance, as long as it does not concern the competition tasks, for example, when your computer breaks down.


During the competition you can get printouts of ASCII text files. Copy the file(s) to be printed into the root directory `A:\' of your print diskette and hand it over to an official. The print diskette is returned with the printout. The printed files are moved to a subdirectory `A:\TRASH-??'.

Auxiliary Programs

For your convenience, there are two auxiliary programs. Program TIM (Timing and Input/output Monitor) executes a program and reports the run time. Optionally, it copies and shows input and output files. `TIM /?' shows usage instructions (in English).

Program POC (Program and Output Checker) searches and executes each of your solution programs with the example input and checks the output. This way you can verify whether you have put your programs by the right name in the right directory and that they produce output in an acceptable format. `POC /?' shows usage instructions (in English).

Ending the Competition

You will be warned both 15 and 5 minutes before the end of the competition. Go through the following check list for the programming tasks:
  1. Are your programs saved with the right name in the right task directory?
  2. Are the debug features in your programs disabled?
  3. Did you make executables using the right compiler options?
  4. Did you do a final check with `POC'?
At the end signal you must immediately stop working. Put your keyboard on top of the monitor and, on the first day only, put the answer forms in the envelope.

Do NOT switch off your computer. The organization will make a backup of your work. You must leave the print diskette in the room, but you may take the task overview and task descriptions.


Judging of the programming tasks starts one hour after the competition. There will be a schedule giving approximate judging times. An evaluator invites you and your team leader to return to your competition computer and to observe the judging procedure. The evaluator uses special judging software to test you programs. Afterwards you receive a diskette with your work, the test data, and your results.

On the first competition day, judging of the new task will start directly after the competition in a separate room. You are informed of the result afterwards.

Eindhoven, June 12, 1995
Scientific Committee for IOI'95

IOI 95