Hello everyone.
I tried this puzzle with a strategy that I knew was possibly not optimal, and it indeed seems that it doesn’t work, but I don’t really understand why (I can’t find an easy configuration where it doesn’t work). My strategy is as follows:
 I begin by computing for each square the number of squares a rook placed here would attack
 While there remains some unattacked squares, I place a rook on the square attacking the minimum number of notalreadyattacked squares.
On the first example, the iterations give the following results (R means a rook is there, A means it is attacked by at least one rook, so we can’t place another one there and E means it is an empty square where we could possibly place another rook):

Step 1: Add a rook at position (0,3)
[[‘X’ ‘X’ ‘A’ ‘R’ ‘X’]
[‘E’ ‘E’ ‘E’ ‘A’ ‘X’]
[‘X’ ‘X’ ‘E’ ‘X’ ‘E’]
[‘X’ ‘E’ ‘E’ ‘E’ ‘E’]
[‘E’ ‘E’ ‘E’ ‘E’ ‘E’]]

Step 2: Add a rook at position (1,0)
[[‘X’ ‘X’ ‘A’ ‘R’ ‘X’]
[‘R’ ‘A’ ‘A’ ‘A’ ‘X’]
[‘X’ ‘X’ ‘E’ ‘X’ ‘E’]
[‘X’ ‘E’ ‘E’ ‘E’ ‘E’]
[‘E’ ‘E’ ‘E’ ‘E’ ‘E’]]

Step 3: Add a rook at position (2,2)
[[‘X’ ‘X’ ‘A’ ‘R’ ‘X’]
[‘R’ ‘A’ ‘A’ ‘A’ ‘X’]
[‘X’ ‘X’ ‘R’ ‘X’ ‘E’]
[‘X’ ‘E’ ‘A’ ‘E’ ‘E’]
[‘E’ ‘E’ ‘A’ ‘E’ ‘E’]]

Step 4: add a rook at position (2,4)
[[‘X’ ‘X’ ‘A’ ‘R’ ‘X’]
[‘R’ ‘A’ ‘A’ ‘A’ ‘X’]
[‘X’ ‘X’ ‘R’ ‘X’ ‘R’]
[‘X’ ‘E’ ‘A’ ‘E’ ‘A’]
[‘E’ ‘E’ ‘A’ ‘E’ ‘A’]]

Step 5: Add a rook at position (3,1)
[[‘X’ ‘X’ ‘A’ ‘R’ ‘X’]
[‘R’ ‘A’ ‘A’ ‘A’ ‘X’]
[‘X’ ‘X’ ‘R’ ‘X’ ‘R’]
[‘X’ ‘R’ ‘A’ ‘A’ ‘A’]
[‘E’ ‘A’ ‘A’ ‘E’ ‘A’]]

Step 6: Add a rook at position (4,1)
[[‘X’ ‘X’ ‘A’ ‘R’ ‘X’]
[‘R’ ‘A’ ‘A’ ‘A’ ‘X’]
[‘X’ ‘X’ ‘R’ ‘X’ ‘R’]
[‘X’ ‘R’ ‘A’ ‘A’ ‘A’]
[‘R’ ‘A’ ‘A’ ‘A’ ‘A’]]
So I find 6 rooks as expected.
BUT
for the size 16, I find 46 rooks instead of 47 and for the first and third size 99, I find respectively 1907 and 2074 instead of 1911 and 2076. All the other example work (including the second size 99).
Does anyone see an example where this method doesn’t work and why?