Competitive Programming

IOI 2011

All 7 IOI tasks from 2011, organized as individual solution pages.

7 problem pages
7 editorials
7 C++ solutions
May 21, 2026 most recently updated solution

Problem set

Each entry below goes straight to the public problem page, with the statement, editorial, code, and raw resources kept together.

IOI 2011

Crocodile

A network of N chambers connected by M bidirectional corridors with travel times. Some K chambers are exits. A person starts at chamber 0. After choosing which corridor to take, a crocodile may block it, forcing the p...

TeX C++
Open problem page
IOI 2011

Dancing Elephants

N elephants stand on a number line. A camera covers a contiguous interval of length L. Determine the minimum number of cameras to photograph all elephants. After each update (one elephant moves), recompute the answer.

TeX C++
Open problem page
IOI 2011

Garden

A garden has N nodes and M edges (trails), each with a beauty value (lower index = more beautiful). From each node, you always take the most beautiful available trail. Because you cannot immediately backtrack, each no...

TeX C++
Open problem page
IOI 2011

Hottest (Hot)

Given N measurement points in the plane, each at (x_i, y_i) with temperature t_i, find a circle of radius R that maximizes the average temperature of enclosed points. Output the center of such a circle.

TeX C++
Open problem page
IOI 2011

Parrots

Encode a message of N 64 bytes into a multiset of integers in [0,255]. The decoder receives the integers in arbitrary order and must reconstruct the original message exactly.

TeX C++
Open problem page
IOI 2011

Race

Given a tree with N nodes and weighted edges, find a path of total weight exactly K that uses the minimum number of edges. Output -1 if no such path exists.

TeX C++
Open problem page
IOI 2011

Ricehub

There are R rice fields at sorted positions x_1 < x_2 < < x_R along a line. A hub can be placed at any integer position. The cost of connecting field i to a hub at position h is |x_i - h|. Given budget B, find the max...

TeX C++
Open problem page