IOI 2001 Programming Environment

Programming environment

General information
Hardware Linux
Gcc on Linux
Pascal on Linux
Gcc on Windows
Pascal on Windows

Please first check the general information about the competition programming environment from the Competition Rules.

The main environment for the contest is Linux. Linux is available as a programming environment (specifications below) and also the servers and evaluation (grading) runs on Linux.

In Beijing the majority of teamleaders wanted to have Windows available for the contestants. It is evident that providing both of these two environments implies several problems. However, we provide the contestants with dual-boot computers where you can program either in Linux or in Windows environment.

This year the evaluation is based on source-code submission and the evaluation system compiles the submitted source code. As a consequence, also the programs written in the Windows environment are re-compiled for evaluation in Linux (using the same compiler). This is something that all contestants using Windows must be aware of.

Generally, we favour fairly standard operating system installations. There are four primary reasons why we might want to modify the installations.

1. Hardware support. It may be necessary to upgrade some parts of the system to support the hardware. We will know more of this once we learn about the hardware.

2. Compatibility between platforms. We want to have the same versions of the compilers on both platforms.

3. Security. In particular the Windows environment is a big risk for security. This might be partly helped by changing the installation. Certain configurations will be changed on both platforms.

4. Installation size. If we can not get the broadcast install to work on the hardware, then, to enable network install, we may want to cut down the sizes of the installations. It is as yet open whether we need to do this.

The compilers used in the competition are gcc for C and C++ programs and Freepascal for Pascal programs. These were generally accepted by teamleaders in Beijing.

We hosted the Finnish national finals to try out the compilers, IDEs (development interfaces), source-code evaluation, and the operating systems.

Generally, the installations are designed for the following main alternatives:
1. Pascal as the programming language, freepascal compiler, freepascal IDE.
2. C/C++ as the programming language, gcc compiler, rhide IDE.
3. Emacs (or vim), command-line compilation, a graphical front end "ddd" to debugging.
Option 3 is targeted primarily for Linux, although it is possible to use Windows Edit and command-line compilation.

Currently all hardware information is in the competition rules. Although we do not have any of the computers at the moment, these are the specifications for the competition computers. We are expecting to get a test lab by the end of March.
For Linux, we are using Debian installation release 2.2r2. The hardware might have bigger implications for the choice of Linux installation than the choice of Windows installation. Also, we need to have the same compiler versions as for the Windows platform.

We do not know the hardware for the competition yet, so we do not know what kernel and XFree versions will be required. However, we are confident that we can make everything work based on Debian release 2.2r2. Debian's home pages are at

You may want to learn about using Linux and do not want to install it. The GNU tools are in the core of the Linux facilities, and you can obtain a much larger collection of them from the DJGPP package (see Windows/gcc). A collection of GNU facilities can also be obtained from This Cygwin package has even more of the feel of Linux, as they are being used through the bash shell, which is common in Linux systems. DJGPP is based on using the Windows DOS shell.

We are using Windows 98 SE, since it is simpler and smaller and easier to administrate than Windows NT or Windows 2000 and has better hardware support than Windows 95. We expect support for the hardware to be available in Windows 98 SE. You can get information about Windows from
Gcc on Linux

We use Gcc 2.95.2 which you can install as a part of the Linux Debian release 2.2r2. Version 2.95.2 is also the official version announced at

You can learn about the availability of various gcc versions through If you install a Linux version and include development tools, then you are extremely likely to get a gcc version.

If you go to an ftp site which mirrors, then you will find the 2.95.2 version and a whole lot of other versions in something probably like /pub/mirrors/

Pascal on Linux
You can get the Freepascal software through See, which shows a number of mirror sites. They are also available as Debian packages through Debian mirror sites. We have installed the full set of Debian packages.

Our current installation includes all the following packages:
fp-compiler_1.0.4-1_i386.deb 02-Jan-2001 12:40 646k
fp-docs_1.0.4-1_all.deb 02-Jan-2001 12:40 2.2M
fp-units-api_1.0.4-1_i386.deb 02-Jan-2001 12:40 99k
fp-units-base_1.0.4-_i386.deb 02-Jan-2001 12:40 200k
fp-units-db_1.0.4-1_i386.deb 02-Jan-2001 12:40 78k
fp-units-fcl_1.0.4-1_i386.deb 02-Jan-2001 12:40 824k
fp-units-gfx_1.0.4-1_i386.deb 02-Jan-2001 12:40 250k
fp-units-gtk_1.0.4-1_i386.deb 02-Jan-2001 12:40 290k
fp-units-misc_1.0.4-1_i386.deb 02-Jan-2001 12:40 161k
fp-units-net_1.0.4-1_i386 02-Jan-2001 12:40 23k
fp-units-rtl_1.0.4-1_i386 02-Jan-2001 12:40 526k
fp-utils_1.0.4-1_i386.deb 02-Jan-2001 12:41 673k

The Linux version of the ide is not a part of the official installation, but according to our information, it works. We have also tested it ourselves and it has worked. You should be able to find it at a mirror site at the directory
once you find the freepascal directory. The ide is available as tar package (linuxide.tar).

Gcc on Windows

The gcc compiler version we are using in the windows environment is gcc 2.95.2. This is also the official version announced at

WARNING: If you install freepascal and gcc (e.g. as in DJGPP) in the same Windows installation, be sure to have DJGPP in your path before freepascal, or gcc won't work. This seems to be because it finds cpp.exe from the pascal binaries and then thinks that the pascal binary directory is the place for its compiler binaries, which it subsequently fails to find. (This is just my guess - JN)

For windows, we are using the DJGPP. You can find out about DJGPP and downloading it from

Our current installation includes the following packages:
v2/readme.1st - a readme file.
v2/ - a FAQ.
v2/ - timezone files, not all of these are necessary, I think.
v2gnu/ - GNU C Compiler binaries and docs (including the docs for the C++ compiler).
v2gnu/ - GNU Binutils, including as, the GNU assembler; ld, the GNU linker; and their docs.
v2/ - C header files and libraries, library reference, minimal development environment (including assembly-level debuggers), DJGPP-specific utilities and their documentation. Required to compile/link C programs.
v2gnu/ - Info, with this you can read GNU documentation.
v2gnu/ - GNU C++ compiler, the C++ header files and standard C++ class libraries, including the STL, and their docs.
v2gnu/ - GNU Make program with its docs.

For installation, take also v2/install.exe.

To accompany these, we installed the rhide v. (version by A. Pavenis) turbo-lookalike integrated development environment (, which was obtained from

Pascal on Windows

For Pascal at the Finnish competition, we installed Freepascal 1.0.4. It has its own IDE. Freepascal does not seem to work too well with rhide with only a minimal effort to set it up.

See for obtaining a copy. If you install the full version, you just first unzip the file and run install.exe.

Jyrki Nummenmaa