Chess game
CodeChefOpen on judge ↗
Two children Bhima and Shiva are playing a chess game called DieHard. In the game they have a zero based indexing chess board of size (1001 x 1001). Position ( i , j ) on the board denotes i-th row and j-th column. Initially board is empty and they put a coin on position ( x , y ). Now they start the game by alternating turns. In each turn a player can do one of the following: - move coin from (
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