← All problemsSign in

Infinity Chess

Gamora and Thanos are fighting for the infinity stone. To help Gamora you first need to play a game of Chess. In the $N \times N$ Chess Board, you have to place $N/2$ (if n is odd use $ceil(N/2)$) $Queens$ which can only be placed on the diagonal where $i = j$, where $i$ and $j$ are the row and column indices of the Chess Board respectively. These $Queens$ are supposed to be placed in such a w

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