Shoot Out
CodeChefOpen on judge ↗
There are N participants standing in a circle along with their guns and waiting for their turn. The game starts with one person (from the 1st person). The numbering of the participants is given in a fixed direction of the circle and it never changes (from 1 to N). In each turn, a person can shoot another person by skipping some number of people. The person who gets shot will be eliminated. The per
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