Skip to main content

Checkpoint: The Tyrant Check

Challenge on lesson: Checkpoint — Break It Yourself

CHALLENGE
Difficulty: advanced+25 XP

**Task.** n numbers. Print 1 if some value appears STRICTLY more than n/2 times, else 0. **Constraints:** 1 ≤ n ≤ 200000; 0 ≤ a_i < 10^9. **Adversarial note:** ties and boundary counts (exactly n/2) are where plausible solutions die. The full-scale test is tie-heavy on purpose.

Back to lesson: Checkpoint — Break It Yourself