Competitive Programming

ICPC 2018

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

11 problem pages
11 statement text files
11 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 2018

A. Catch the Plane

A

Your plane to the ICPC Finals departs in a short time, and the only way to get to the airport is by bus. Unfortunately, some of the bus drivers are considering going on strike, so you do not know whether you can get to the airport on time. Your goal is to p...

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

B. Comma Sprinkler

B

As practice will tell you, the English rules for comma placement are complex, frus- trating, and often ambiguous. Many people, even the English, will, in practice, ignore them, and, apply custom rules, or, no rules, at all. Doctor Comma Sprinkler solved thi...

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

C. Conquer The World

C

Bwahahahahaha!!! Your nemesis, the dashingly handsome spy Waco Powers, has at last fallen to your secret volcano base’s deathtraps (or so you assume, being a little too busy to witness it firsthand). At long last, you are all set to C ONQUER T HE W ORLD! No...

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

D. Gem Island

D

Gem Island is a tiny island in the middle of the Pacific Ocean. Until recently, it was known as one of the poorest, but also most peaceful, places on Earth. Today, it is neither poor nor peaceful. What happened? One sunny morning, not too long ago, all inha...

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

E. Getting a Jump on Crime

E

Your friend Robin is a superhero. When you first found out about this, you figured “everybody needs a hobby, and this seems more exciting than stamp collecting,” but now you are really thankful that somebody is doing something about the crime in your hometo...

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

F. Go with the Flow

F

In typesetting, a “river” is a string of spaces formed by gaps between words that extends down sev- eral lines of text. For instance, Figure F.1 shows several examples of rivers highlighted in red (text is intentionally blurred to make the rivers more visib...

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

G. Panda Preserve

G

Last month, Sichuan province secured funding to establish the Great Panda National Park, a natural preserve for a population of more than 1 800 giant pandas. The park will be surrounded by a polygonal fence. In order for researchers to track the pandas, wir...

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

H. Single Cut of Failure

H

The Intrusion and Crime Prevention Company (ICPC) builds intrusion detection systems for homes and businesses. The International Collegiate Programming Contest (in a strange coincidence also known as ICPC) is considering hiring the company to secure the roo...

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

I. Triangles

I

For your trip to Beijing, you have brought plenty of puzzle books, many of them containing challenges like the following: how many triangles can be found in Figure I.1? Figure I.1: Illustration of Sample Input 2. While these puzzles keep your interest for a...

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

J. Uncrossed Knight’s Tour

J

A well-known puzzle is to “tour” all the squares of an 8 × 8 chessboard using a knight, which is a piece that can move only by jumping one square in one direction and two squares in an orthogonal direction. The knight must visit every square of the chessboa...

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

K. Wireless is the New Fiber

K

A new type of unbounded-bandwidth wireless communication has just been tested and proved to be a suitable replacement for the existing, fiber-based communications network, which is struggling to keep up with traffic growth. You have been charged with decidi...

TeX C++ Statement text Statement PDF
Open problem page