2. It is allowed to cut out any 18 cells from a $20 \times 20$ chessboard, and then place several rooks on the remaining cells so that they do not attack each other. What is the maximum number of rooks that can be placed in this way? Rooks attack each other if they stand on the same row or column of the board and there are no cut-out cells between them. (O. Dmitriev, R. Zhenodarov)
Answer: 38 rooks. Solution: Let's call the cut-out cells holes. In addition to them, add a hole at the bottom of each vertical line of the board, and a hole to the right of each horizontal line; a total of $2 \cdot 20=40$ holes are added. Suppose several rooks are placed on the board, not attacking each other. We will temporarily assume that a rook only attacks to the right and down. Then each rook attacks one hole to the right and one hole below itself (i.e., there are no other holes or rooks between it and these holes). On the other hand, each of the 18 original holes on the board is attacked by no more than two rooks (at most one from above and one from the left), and each of the 40 added holes is attacked by no more than one rook. Therefore, the total number of rooks on the board is no more than $(18 \cdot 2+40) / 2=38$.

It remains to provide an example of placing 38 rooks that satisfy the condition. For this, cut out all the cells of one of the main diagonals of the board, except for the two corner cells, and place the rooks on all cells adjacent to the cut-out ones. The figure on the right shows an example of such a placement on a $6 \times 6$ board.

![](https://cdn.mathpix.com/cropped/2024_05_06_4f2190590c942c6c9afdg-1.jpg?height=325&width=317&top_left_y=1134&top_left_x=1666)