Problem (Combinatorics):
In each square of a garden shaped like a $2022 \times 2022$ board, there is initially a tree of height 0 . A gardener and a lumberjack alternate turns playing the following game, with the gardener taking the first turn:

- The gardener chooses a square in the garden. Each tree on that square and all the surrounding squares (of which there are at most eight) then becomes one unit taller.
- The lumberjack then chooses four different squares on the board. Each tree of positive height on those squares then becomes one unit shorter.

We say that a tree is majestic if its height is at least $10^{6}$. Determine the largest number $K$ such that the gardener can ensure there are eventually $K$ majestic trees on the board, no matter how the lumberjack plays.

Solution:
We solve the problem for a general $3 N \times 3 N$ board. First, we prove that the lumberjack has a strategy to ensure there are never more than $5 N^{2}$ majestic trees. Giving the squares of the board coordinates in the natural manner, colour each square where at least one of its coordinates are divisible by 3 , shown below for a $9 \times 9$ board:



Then, as each $3 \times 3$ square on the board contains exactly 5 coloured squares, each move of the gardener will cause at most 4 trees on non-coloured squares to grow. The lumberjack may therefore cut those trees, ensuring no tree on a non-coloured square has positive height after his turn. Hence there cannot ever be more majestic trees than coloured squares, which is $5 N^{2}$.

Next, we prove the gardener may ensure there are $5 N^{2}$ majestic trees. In fact, we prove this statement in a modified game which is more difficult for the gardener: on the lumberjack's turn in the modified game, he may decrement the height of all trees on the board except those the gardener did not just grow, in addition to four of the trees the gardener just grew. Clearly, a sequence of moves for the gardener which ensures that there are $K$ majestic trees in the modified game also ensures this in the original game.



Let $M=\left(\begin{array}{l}9 \\ 5\end{array}\right)$; we say that a $m a p$ is one of the $M$ possible ways to mark 5 squares on a $3 \times 3$ board. In the modified game, after the gardener chooses a $3 \times 3$ subboard on the board, the lumberjack chooses a map in this subboard, and the total result of the two moves is that each tree marked on the map increases its height by 1, each tree in the subboard which is not in the map remains unchanged, and each tree outside the subboard decreases its height by 1 . Also note that if the gardener chooses a $3 \times 3$ subboard $M l$ times, the lumberjack will have to choose some map at least $l$ times, so there will be at least 5 trees which each have height $\geqslant l$.

The strategy for the gardener will be to divide the board into $N^{2}$ disjoint $3 \times 3$ subboards, number them $0, \ldots, N^{2}-1$ in some order. Then, for $b=N^{2}-1, \ldots, 0$ in order, he plays $10^{6} M(M+1)^{b}$ times on subboard number $b$. Hence, on subboard number $b$, the moves on that subboard will first ensure 5 of its trees grows by at least $10^{6}(M+1)^{b}$, and then each move after that will decrease their heights by 1 . (As the trees on subboard $b$ had height 0 before the gardener started playing there, no move made on subboards $\geqslant b$ decreased their heights.) As the gardener makes $10^{6} M(M+1)^{b-1}+\ldots=10^{6}\left((M+1)^{b}-1\right)$ moves after he finishes playing on subboard $b$, this means that on subboard $b$, there will be 5 trees of height at least $10^{6}(M+1)^{b}-10^{6}\left((M+1)^{b}-1\right)=10^{6}$, hence each of the subboard has 5 majestic trees, which was what we wanted.

Final answer: 2271380