Skip to main content
๐Ÿ“œ WAYPOINT LESSON

The Bands Are a Ladder

โญโญโญ advancedโณ 12 min read๐Ÿ“ Lesson 234 of 281

Constraints per subtask name algorithms; the easiest band is a guaranteed-points problem of its own.

The Bands Are a Ladder

A partial-scoring problem is really a stack of problems with a shared statement. The scoring bands are not consolation prizes โ€” they are a design document:

  • "n โ‰ค 20" โ†’ the full 2^n enumeration is intended for that band.
  • "n โ‰ค 2000" โ†’ O(nยฒ) is invited.
  • "n โ‰ค 200000, no updates" โ†’ static prefix structures.
  • "values โ‰ค 10^9" โ†’ coordinate compression or 64-bit.
  • "all a_i equal" / "a_i โ‰ค 2" โ†’ degenerate-case specialization.

Reading order

  1. Read the full statement once.
  2. Read the bands top-down from the easiest: what algorithm does each band's constraint permit? Name it. That is the band's intended solution.
  3. Estimate implementation time per band, in order. Implement band 1 completely before thinking about band 2.
  4. The bands often teach the full solution: the nยฒ band's DP frequently becomes the full solution's recurrence with a data structure grafted on.

The scoring arithmetic

If band 1 is worth 20 and costs 10 minutes, and the full solution is uncertain and costs 90, the expected-value arithmetic is not close. Bank the certain band first; you can always upgrade later โ€” you cannot submit an empty file at the end.