Who is the Queen
CodeChefOpen on judge ↗
Who is the Queen? Almost everyone knows the problem of putting eight queens on an 8×8 chessboard such that no Queen can take another Queen. Amar wants to know the maximum number of chesspieces of one kind which can be put on an m × n board with a certain size such that no piece can take another. Because it’s rather difficult to find a solution by hand, he asks your help to solve the problem. He d
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