← All problemsSign in

Game of Pooks

CodeChefRating 1121Open on judge ↗

We have found a new chess character — pook. It has the qualities of both a rook and a pawn. Specifically, treating the chessboard to be an $N\times N$ grid where $(i, j)$ denotes the intersection of the $i$-th row and the $j$-th column, a pook placed at square $(x, y)$ threatens the following squares: - $(i, y)$ for every $1 \leq i \leq N$ - $(x, i)$ for every $1 \leq i \leq N$ - $(x+1, y-1)$, if

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start