Problem

Source: Caucasus MO 2024, Seniors P4

Tags: combinatorics



Yasha writes in the cells of the table $99 \times 99$ all positive integers from 1 to $99^2$ (each number once). Grisha looks at the table and selects several cells, among which there are no two cells sharing a common side, and then sums up the numbers in all selected cells. Find the largest sum Grisha can guarantee to achieve.