Ada Rooks
After successfully defending her title of World Chess Champion, Ada noticed that she is lacking in rook endgames. To improve her endgame skills, Ada placed $K$ kings on a chessboard with $N$ rows and $M$ columns, and now she is calculating the minimum number of rooks she must place on the board to satisfy the following conditions: - No king is attacked by a rook. - The kings are isolated, i.e
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