ICPC 2012
All 12 ICPC problems from 2012, each with a statement view, editorial, and C++ implementation.
Problem set
Each entry below goes straight to the public problem page, with the statement, editorial, code, and raw resources kept together.
A. Asteroid Rangers
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...
B. Curvy Little Bottles
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...
C. Bus Tour
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...
D. Fibonacci Words
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...
E. Infiltration
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...
F. Keys
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...
G. Minimum Cost Flow
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...
H. Room Service
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...
I. A Safe Bet
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- @ @...
J. Shortest Flight Path
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...
K. Stacking Plates
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...
L. Takeover Wars
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...