Competitive Programming

ICPC 2012

All 12 ICPC problems from 2012, each with a statement view, editorial, and C++ implementation.

12 problem pages
12 statement text files
12 statement PDFs
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.

ICPC 2012

A. Asteroid Rangers

A

Problem ID: asteroids The year is 2112 and humankind has conquered the solar system. The Space Ranger Corps have set up bases on any hunk of rock that is even remotely inhabitable. Your job as a member of the Asteroid Communications Ministry is to make sure...

TeX C++ Statement text Statement PDF
Open problem page
ICPC 2012

B. Curvy Little Bottles

B

Problem ID: bottle In her bike rides around Warsaw, Jill happened upon a shop that sold interesting glass bottles. She thought it might make an interesting project to use such bottles for measuring liquids, but this would require placing markings on the bot...

TeX C++ Statement text Statement PDF
Open problem page
ICPC 2012

C. Bus Tour

C

Problem ID: bustour Imagine you are a tourist in Warsaw and have booked a bus tour to see some amazing attraction just outside of town. The bus first drives around town for a while (a long while, since Warsaw is a big city) picking up people at their respec...

TeX C++ Statement text Statement PDF
Open problem page
ICPC 2012

D. Fibonacci Words

D

Problem ID: fibonacci The Fibonacci word sequence of bit strings is defined as: if n = 0   0 F (n) = 1 if n = 1 F (n − 1) + F (n − 2) if n ≥ 2  Here + denotes concatenation of strings. The first few elements are: n F (n) 0 0...

TeX C++ Statement text Statement PDF
Open problem page
ICPC 2012

E. Infiltration

E

Problem ID: infiltration Good morning, agent W-12. Your mission, should you choose to accept it, is as follows. We are infiltrating the ever so insidious Association of Chaos and Mischief (ACM) in order to take down their command structure. Unfortunately, t...

TeX C++ Statement text Statement PDF
Open problem page
ICPC 2012

F. Keys

F

Problem ID: keys Adam carries a bunch of keys attached to key rings, some of which may be connected to each other. The rings are common key rings, so a key can be attached to or detached from a ring by sliding along the spiral. In the same way, two rings ca...

TeX C++ Statement text Statement PDF
Open problem page
ICPC 2012

G. Minimum Cost Flow

G

Problem ID: minflow You have been hired to construct a system to transport water between two points in an old factory building using some existing components of the old plumbing. The old components consist of pipes and junctions. Junctions are points where...

TeX C++ Statement text Statement PDF
Open problem page
ICPC 2012

H. Room Service

H

Problem ID: room You are working for a company designing cute, funny robot vacuum cleaners. At a high level, the robots’ behavior is divided into three modes: 1. Exploration 2. Vacuuming 3. Rampant Killing Unfortunately, while consumer testing shows that th...

TeX C++ Statement text Statement PDF
Open problem page
ICPC 2012

I. A Safe Bet

I

Problem ID: safe Safe Ltd. is a company that manufactures high-quality safes. Its latest invention is an optical closure mechanism that uses a laser beam passing through a rectangular grid with several mirrors. Laser- @ @...

TeX C++ Statement text Statement PDF
Open problem page
ICPC 2012

J. Shortest Flight Path

J

Problem ID: shortest Commercial flights are statistically quite safe (in terms of number of deaths per passenger-kilometer, only going to the moon is safer). But there are still reasons for precautions and safety regulations. An early such rule was the so-c...

TeX C++ Statement text Statement PDF
Open problem page
ICPC 2012

K. Stacking Plates

K

Problem ID: stacking The Plate Shipping Company is an Internet retailer that, as their name suggests, exclusively sells plates. They pride themselves in offering the widest selection of dinner plates in the universe from a large number of manufacturers. In...

TeX C++ Statement text Statement PDF
Open problem page
ICPC 2012

L. Takeover Wars

L

Problem ID: takeover You are studying a takeover war between two large corporations, Takeover Incorporated and Buyout Limited. Each of these corporations controls a number of subsidiaries. The aim in this war is simply to drive the competition out of the ma...

TeX C++ Statement text Statement PDF
Open problem page