5. Borya and Vova are playing the following game on an initially white $8 \times 8$ board. Borya moves first and on each of his turns, he colors any four white cells black. After each of his moves, Vova colors an entire row (row or column) completely white. Borya aims to color as many cells black as possible, while Vova aims to prevent him. What is the maximum number of black cells that can be on the board after Borya's move, no matter how Vova plays?

Answer: 25 cells.
Solution. Let Vova make white the row with the most black cells on each of his moves. Then, as soon as Borya achieves a row of no less than four black cells (we will call such a row "rich"), Vova will remove at least four cells, meaning that Borya will not be able to increase the number of black cells compared to his previous move. And further, with the presence of

![](https://cdn.mathpix.com/cropped/2024_05_06_704e715e936cf2f990c2g-3.jpg?height=392&width=394&top_left_y=1021&top_left_x=1508)
rich rows, Vova removes at least 4 black cells, and Borya adds four after that, meaning he cannot increase his maximum result. At the same time, before the first and all subsequent moments of creating a rich row when there are no rich rows on the board, there were a maximum of \(7 \cdot 3 = 21\) black cells—seven rows of 3 black cells, since Vova just made a row of this direction white. Thus, Borya always creates a structure with a maximum of 25 black cells. Now we will show that Borya can always achieve 25 black cells. Let's highlight 24 cells on the board as shown in the figure—three in each vertical and horizontal row. Suppose Borya always colors only the cells of this set, as long as there are white cells among them. Then Vova, with his next move, can remove a maximum of three black cells, meaning the number of black cells after each pair of their moves will increase by at least 1. Therefore, at some point, Borya will be able to make all these cells black (and possibly some others). Then, after Vova's move, there will be no fewer than 21 black cells left, and Borya, with his next move, will achieve at least 25 black cells. Thus, with correct play by both, the maximum number of black cells on the board that Borya can ensure is 25.

Criteria. If the solution is incorrect - 0 points.

If only the correct example is provided - 3 points.

If only the correct estimate is provided - 3 points.

If the correct solution (any correct example and justification of the estimate) - 7 points.