IOI 1989
All 3 IOI tasks from 1989, organized as individual solution pages.
Problem set
Each entry below goes straight to the public problem page, with the statement, editorial, code, and raw resources kept together.
Mobile
Recursive Computation The solution proceeds bottom-up. For each internal node with left subtree weight W_L and right subtree weight W_R, the balance condition d_L W_L = d_R W_R must hold. The minimal positive integer...
Packing Rectangles
Layout Enumeration There are exactly 6 topologically distinct ways to pack 4 axis-aligned rectangles into a bounding box. For rectangles labeled a, b, c, d with dimensions (w_i, h_i): Row: All four side by side. W = w...
Strings
Deriving the Recurrence Let f(n) denote the count of valid binary strings of length n. Partition these strings by their last character: a(n): valid strings of length n ending in 0. b(n): valid strings of length n endi...