Skip to main content

Practice · 2 of 3

The Degenerate Band

CHALLENGE
Difficulty: advanced+25 XP

**Scenario.** Subtask: 'all a_i ≤ 2'. The full solution is a complex DP. What is the band's intended shortcut? **Which approach is the best fit? The program only needs to print the letter.** **A)** The same DP with smaller numbers **B)** Count only the frequencies of 0, 1, and 2 — with values bounded by 2 the answer usually collapses to a closed form over the three counts **C)** Skip the band; it is only worth a few points **D)** Sort and binary search

Back to lesson: Practice: Partial Scoring Drills