← All problemsSign in

Knight Fork

CodeChefRating 1914Open on judge ↗

Forking is an important tactics in the game of chess. A piece is said to perform a fork if 1) It is on a safe square, i.e., the next move by the opponent does not kill the piece 2) It targets atleast 2 of the opponents pieces in its next move. So even if the opponent moves one of his pieces to safety, one of his remaining pieces can be killed. You are given an NxN board, containing M White Quee

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