The Hunger Games
CodeChefOpen on judge ↗
Problem description Katniss is raging the war on Capitol. She along with some rebels from other districts are moving towards the Capitol, one by one. All the rebels are numbered from 0 to N. Katniss is the 0th rebel and Prim (Katniss's younger sister) is the last (Nth) rebel. Katniss, numbered 0, goes first and places N bulbs on the road to Capitol. All are switched off initially. Then the first
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start