CHECKERBOARD
CodeChefOpen on judge ↗
chef gave phoenix a checkerboard of size 1×n. From left to right cells are numbered form 1 to n.In the beginning, some of the cells are occupied with at most one rook, and others are unoccupied. In each operation, phoenix can choose a cell i with a rook, and do either of the following (if possible): Move the rook from it to the (i+2)-th cell, if i+2≤n and the (i+1)-th cell is occupied and the (i+2
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