Skip to main content

Practice · 1 of 3

The Three Bands

CHALLENGE
Difficulty: advanced+25 XP

**Scenario.** A counting problem: subtask 1 (20 pts) n ≤ 20; subtask 2 (30 pts) n ≤ 2000; subtask 3 (50 pts) n ≤ 200000. You have a proven O(n²) idea and 60 minutes left. Optimal plan? **Which approach is the best fit? The program only needs to print the letter.** **A)** Implement only O(n²) — it passes subtask 2 fully and maybe 3 **B)** Ship brute force for subtask 1 first (15 min), then O(n²) for subtask 2; skip 3 — banking 50 certain points **C)** Spend all 60 minutes attempting the full O(n log n) solution **D)** Submit brute force for everything — it is simplest

Back to lesson: Practice: Partial Scoring Drills