Problem

Source: 2021 Thailand TST 0.1

Tags: combinatorics, table, Team Selection Test



For a positive integer $n$, consider a square cake which is divided into $n \times n$ pieces with at most one strawberry on each piece. We say that such a cake is delicious if both diagonals are fully occupied, and each row and each column has an odd number of strawberries. Find all positive integers $n$ such that there is an $n \times n$ delicious cake with exactly $\left\lceil\frac{n^2}{2}\right\rceil$ strawberries on it.