ARJUN AND HIS CLASSMATES
CodeChefOpen on judge ↗
Arjun is the favourite student of his drill Master. His teacher being busy in a work assigned a task to Arjun. There are $N$ number of students in the ground standing in a particular row with their favourite sub leader. Arjun has to make all the students stand in a single row. But the sub leaders are too notorious to listen. They can move from ith row to (i+2)th row or (i-2)th row for free but to
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