4. $k$ chess pieces are placed in $k$ cells of an $n \times n (n \geqslant 2)$ grid (each cell contains exactly one piece), and in every $2 \times 2$ subgrid, there are exactly two pieces. Find all possible values of $k$.
(62nd Belarusian Mathematical Olympiad)
Using the odd-even analysis method: When $n$ is even, divide the $n \times n$ grid into $m^{2}=\frac{n^{2}}{4}$ sub-grids of $2 \times 2$, and from each $2 \times 2$ sub-grid, there are exactly two chess pieces, resulting in a total of $\frac{n^{2}}{2}$ chess pieces; When $n$ is odd, divide the $n \times n$ grid into $2 \times 2$ sub-grids and the shape shown in Figure 3, as illustrated in Figure 4. Then, it can be concluded that there is at least one chess piece in the shape shown in Figure 3. Considering the number of chess pieces and empty spaces, the conclusion can be drawn.