5. On a grid paper, a square of $11 \times 11$ cells is drawn. It is required to mark the centers of some cells in such a way that the center of any other cell is located on a segment connecting some two marked points lying on the same vertical or on the same horizontal. What is the smallest number of cells that need to be marked?
76.5. Answer. 22 cells.

76,6. Let $a_{1}, a_{2}, \ldots, a_{m}$ be the sizes of the smaller square plots, $n$ be the side length of the larger square, and $S$ be the sum of the lengths of the internal fences. Then, obviously, $4 \sum a_{i}=2 S+4 n$, $\sum a_{i}^{2}=n^{2}$. From the second equality, it follows that $\sum a_{i}$ and $n$ have the same parity, and therefore, $2 \sum a_{i}$ and $2 n$ have the same remainders when divided by four. We get that $S=2 \sum a_{i}-2 n$ is divisible by four, and thus, the sum of the lengths of all fences $S+4 n$ is divisible by four.