NEWS.DISPATCHUSACO GUIDE / FIELD NOTE

How to Read a USACO Problem Statement in English: The Reading Order, and the Words That Change the Answer

FILECONTEST INTEL
STATUSPUBLISHED
FOCUSUSACO / PREPARATION
MODEEXPLAINER
READING.MODEFULL BRIEFINGScroll to explore

Read it out of order. Constraints first, then the output specification, then the input specification, then the sample, and the story last. For students working in a second language, in our coaching experience most of the marks lost to statement misreading come from a handful of quantifier words — at most, exactly, distinct, contiguous — rather than from ordinary vocabulary.

The story is packaging. The specification is the problem.

USACO statements are written as small farm narratives. There is a herd, there are cows with names, there is a farmer with a problem, and the actual computational task is introduced somewhere in the middle of that. Students meeting this for the first time often assume the narrative is the difficulty, and that a stronger English vocabulary is what stands between them and a solve.

It is not. The narrative is deliberately low-register English — short sentences, everyday nouns, no idioms worth speaking of. What carries the actual difficulty is the block of text underneath it: the input format, the output format and the constraints. That block is written in a compressed technical register where every word is load-bearing, and where a single missed qualifier changes the correct answer.

This produces a specific failure mode we see repeatedly in mock contests. A student reads the whole statement top to bottom at a uniform speed, understands the story perfectly, forms a mental model of the task from the story alone, and then skims the specification because it looks like formalities. Forty minutes later they have written a correct program for a problem that was not asked.

The fix is not more English study. It is changing the order and the speed at which you read the parts.

Read the statement in this order, not top to bottom

Treat a statement as six separate documents that happen to be printed on one page. Read them in the order that most reduces your uncertainty, and read each at the speed it deserves.

Two columns. The left column shows the printed order of a USACO statement: title and story, input format, output format, constraints, sample input and output, sample explanation. The right column shows the recommended reading order: constraints first, then output format, input format, sample input and output, sample explanation, and the story last, skimmed.
A reading protocol, not an official instruction: the specification blocks resolve more uncertainty per minute than the narrative does. Section names and layout vary by problem — check the statement in front of you on usaco.org.

Two notes on that order. First, constraints come first because they silently decide which algorithms are even admissible, which is why they deserve your slowest reading of the whole page; we have written separately about turning those bounds into a running-time budget, and the division-level topic map in our division guide covers what each level expects.

Second, the story goes last but is not optional. Occasionally a rule that cannot be recovered from the formal sections lives only in the narrative — a restriction on who may move, an ordering that is implied rather than stated. Skim it, but skim it hunting for rules, not atmosphere.

One more line worth locating on every problem before you type anything: how the program is expected to receive input and emit output. Statements say this explicitly, and the convention is not something to assume from a friend's old template. Read the line, and confirm the current rules on usaco.org, where registration and participation take place.

The words that quietly change the answer

Below is the vocabulary that actually costs marks. None of it is difficult English. All of it is precise English, and precision is exactly what gets flattened when a statement is machine-translated in bulk.

Phrase in the statement What it precisely means What goes wrong if you skim it
at most K K or fewer, including zero You build a solution that assumes exactly K and fail the small cases
at least K K or more, no upper limit stated You cap something the problem never capped
exactly one line One line of output, nothing else A leftover debug print or trailing text scores zero on a correct algorithm
distinct Guaranteed no repeated values You write duplicate-handling logic you did not need, and lose time
not necessarily distinct Repeats are allowed and will appear in tests Your logic quietly assumes uniqueness and breaks on hidden tests only
1-indexed The first element is numbered 1 Every array access is off by one; the sample may still pass by luck
inclusive Both endpoints are part of the range You drop one element at each boundary
contiguous / consecutive Elements adjacent in the original order You solve the much harder subsequence problem instead
strictly increasing Equal neighbours are not allowed Ties are accepted and your count is too high
non-decreasing Equal neighbours are allowed Ties are rejected and your count is too low
it is guaranteed that… The tests will never violate this You spend contest minutes defending against a case that cannot occur
if no such… exists, print … There is a defined answer for the impossible case Your program prints nothing, or crashes, on tests designed for exactly this
lexicographically smallest Dictionary order, not numeric or shortest You return a valid answer that is the wrong one of many valid answers
in any order Multiple orderings are accepted You waste time sorting output that did not need sorting

This is where wholesale translation hurts. English distinguishes at most from exactly with two short words; a fast automatic rendering into another language frequently collapses both into a single natural-sounding phrase, and the collapse is invisible because the translated sentence reads perfectly well. The student then solves a subtly different problem with complete confidence.

There is a second reason to build the habit of reading the specification in English directly: on contest day you should assume that you must be able to read the statement yourself. What outside help is and is not permitted, for the whole multi-day contest window and not only your own timed session, is set by USACO, published on usaco.org, and summarised on our rules page — check it there rather than relying on any second-hand account, including this one.

A five-row table showing trap phrases in USACO statements. At most K means K or fewer including zero. Exactly one line means no extra output. Distinct means no repeats are guaranteed. One-indexed means the first element is numbered one. Contiguous means adjacent elements, not a subsequence. Each row shows the consequence of misreading it.
Illustrative phrasings written by us, not quoted from any problem. The point is the category of word, not the specific sentence.

The sample case is a specification, not decoration

The sample input and output, together with the explanation beneath them, are the most under-used part of the page. Many contestants read the sample, think “that looks about right”, and move on. Then they discover during testing that their reading of the task and the setter's reading diverged.

The discipline is simple and it costs about four minutes. Before writing any code, work the sample by hand on paper. Take the given input, apply your understanding of the rules, and produce the output yourself. Then compare with the printed sample output.

  • If your hand answer matches, you have evidence — not proof, but evidence — that you have understood the task, and you may start coding.
  • If it does not match, you have just saved yourself the forty minutes you were about to spend implementing the wrong problem. Reread the output format and the sample explanation; the discrepancy is nearly always there.
  • If you cannot work it by hand at all, you do not yet understand the problem well enough to code it, regardless of how clear the story felt.

The sample explanation deserves particular attention because it often states, in plain sentences, a rule that the formal sections left implicit — why one candidate answer was rejected in favour of another, or how ties are broken. Treat it as binding text.

There is one honest caveat: samples are small and gentle by design. Passing the sample tells you your reading is plausible; it tells you very little about whether your solution is fast enough or handles the edge cases the hidden tests are built around. Reading comprehension and running-time budgeting are separate skills that fail separately.

A two-week drill that fixes this permanently

This is a trainable skill with an unusually short learning curve — in our experience it responds faster than any algorithm topic, because the underlying knowledge is small and the gain is mostly habit. Ten focused minutes a day for a fortnight is enough for most students to stop losing marks this way.

The drill. Take one problem a day from an organised past set at or just below your current division — we keep past problems arranged by division on our past contests page. Do not solve it. Instead, spend ten minutes producing a five-line specification card:

  1. Input shape — how many lines, what is on each, in what order.
  2. Output shape — exactly what is printed, in exactly what format, including the impossible case.
  3. The binding bound — the largest quantity in the constraints, written as a number.
  4. The quantifiers — every at most, distinct, contiguous, strictly in the statement, listed.
  5. What “the answer” is — one sentence, in your own words, with no farm nouns in it.

That last line is the one that does the work. Restating the task without the narrative — not “how many cows can reach the barn” but “the number of starting positions from which a valid path exists” — is the exact translation the contest is actually asking you to perform. Students who can do it reliably stop misreading problems; students who cannot are usually solving the story rather than the specification.

After the ten minutes, check your card against a solution write-up or editorial for that problem. You are not checking whether you would have solved it. You are checking one thing only: did you understand what was being asked? Keep a running tally. In our own coaching we typically see students start somewhere around half and reach near-perfect within two weeks, at which point the drill has done its job and you can fold it into ordinary practice.

Two habits worth carrying into the contest itself. Build a personal glossary once — the table above is a starting point, and you will add perhaps ten more phrases from your own mistakes — then never translate those words again; recognise them. And on contest day, read all the statements before starting any of them, because the four-to-five-hour block you choose inside the contest window is short, and the most expensive minutes are the ones spent implementing a problem you had not finished reading. Practice material and topic references are collected on our resources page.

Frequently asked questions

Do I need a large English vocabulary for USACO?
No. Statements use plain, low-register English. The difficulty is precision words such as at most, distinct and contiguous, not rare vocabulary.

Can I translate the problem statement during a USACO contest?
What outside help is permitted is set by USACO and published on usaco.org. Assume you must be able to read the statement yourself, and confirm the current rules there.

Why do the problems feature cows and a farmer?
It is a long-running narrative convention that wraps the task in a story. The story is packaging; the input, output and constraint blocks carry the actual specification.

If my program passes the sample, is my understanding correct?
Probably, but not certainly. Samples are small by design. They test your reading, not your running time or your handling of edge cases.

This is an independent guide operated by Hanlin Education for China-based international-school students. It is not affiliated with, endorsed by, or sponsored by USACO (the USA Computing Olympiad). Contest rules, statement conventions, input and output requirements, promotion cutoffs and contest dates are set by USACO and may change — always confirm current details on usaco.org, where registration and participation take place. Any factual error brought to our attention is corrected within 7 working days.

END.OF.FILEKEEP SOLVING