logo Baltic Olympiad in Informatics
April 30 – May 3, 2010, Tartu, Estonia

Spoilers and Model Solutions

In general, the solutions for Linux and for Windows only differ in the line break format (LF vs CR+LF) and the compression tool used (tar+gzip vs zip).

Task grid

Spoiler: PDF (40 KB); model solutions: for Linux (623 B), for Windows (653 B).

In this task, the output values can get too big for 32-bit integers. The output format specifiers used for 64-bit integers by glibc on Linux and MSVCRT on Windows are different. Note that also GCC/MinGW uses MSVCRT, so the Windows-style format specifier should be used. GCC/CygWin uses glibc, however, so the Linux-style specifier should be used.

The above issues concern only C programmers and C++ programmers using the C-style input-output.

Task silly

Spoiler: PDF (31 KB); model solutions: for Linux (294 B), for Windows (324 B).

C programmers face the same output formatting issues as in task grid.

Task bears

Spoiler: PDF (90 KB); model solutions: for Linux (801 B), for Windows (828 B).

Task lego

Spoiler: PDF (36 KB); model solutions: for Linux (1019 B), for Windows (1 KB).

C programmers face the same output formatting issues as in task grid.

Task pcb

Spoiler: PDF (43 KB); model solutions: for Linux (1.8 KB), for Windows (2.8 KB).

Task bins

Spoiler: PDF (47 KB); model solutions: for Linux (564 B), for Windows (606 B).

Task candies

Spoiler: PDF (64 KB); model solutions: for Linux (1.2 KB), for Windows (1.8 KB).

Task mines

Spoiler: PDF (40 KB); model solutions: for Linux (1.6 KB), for Windows (1.6 KB).