Editorial for DMOPC '23 Contest 1 P2 - Knights on Chessboard
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
There are many solutions to this problem. The intended solution will be described here.
Notice that placing a full row of knights covers five rows: itself, and the two rows above and below it. Thus, starting from the third row, and every five rows, we place a full row of knights. To fit within the bound of knights, casework is required for handling and .
Comments
This comment is hidden due to too much negative feedback. Show it anyway.