Skip to main content
๐Ÿ“œ WAYPOINT LESSON

The Editorial Protocol

โญโญโญ advancedโณ 15 min read๐Ÿ“ Lesson 278 of 281

Attempt-first editorial study: stall rule, observation-first reading, clean re-implementation, variation transfer.

The Editorial Protocol

Reading editorials badly is a skill leak: you nod, you move on, the next unfamiliar problem destroys you anyway. The protocol below turns an editorial into training.

The stall rule

Do not open the editorial until you have a stalled attempt: a concrete brute force written down, its bottleneck measured or clearly identified, and at least 30 minutes of real attack on that bottleneck. Reading after a real stall works; reading after five minutes teaches nothing.

Reading order โ€” never linear

  1. Observation section only. Close the tab. Re-derive the algorithm from the observation alone.
  2. Complexity line. Does your derivation match? If theirs is O(n log n) and yours is O(n logยฒ n), find the missing trick before reading code.
  3. Implementation only when stuck. The code is the last section. If you need it, you are copying an idea you have not understood yet โ€” go back to step 1.
  4. Common wrong approaches. Read these even when you solved it: the near-misses are where the next contest's WA lives.

The re-solve

Close everything. Re-implement the solution from a blank editor. If you cannot, you read a solution; you did not learn an idea. Then solve the variation below โ€” same core insight, different statement. If the variation stalls you again, the insight did not transfer; re-derive it.

Two worked examples ship with this module

Both follow the exact structure: Observation โ†’ Brute force โ†’ Why it fails โ†’ Key insight โ†’ Optimization โ†’ Complexity โ†’ Common wrong approaches. Use them as templates for post-contest editorial study โ€” including self-written editorials for problems you did solve, which is how the proof habit forms.

โšก Now practice

Ready to Code
Editorial Problems and VariationsTwo editorial-tier problems (non-adjacent max revenue; zero-XOR segments), each with a hidden variation in the checkpoint lesson. Solve blind first; the editorials are in the lesson pages.
2 challenges ยท ยท ~90 min