← All problemsSign in

One Piece

L and Light are playing a game. They take a $N \times N$ board. There are $K$ pieces on the board whose positions are specified in terms of their $X$ and $Y$ coordinate (coordinates start from (1,1),i.e, $1 \le X \le N$ and $1 \le Y \le N$). Two pieces cannot be on same position. First it is L’s turn. L specifies $Q$ numbers $Z_1, Z_2 \dots Z_Q$. For each $Z_i$ Light has to find the number of rect

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