5. On a chessboard of size $2015 \times 2015$, dominoes are placed. It is known that in every row and every column there is a cell covered by a domino. What is the minimum number of dominoes required for this?
Solution Let's start filling the 2015 × 2015 square with dominoes starting from the lower left corner (see figure). The first domino will be placed horizontally, covering two vertical lines and one horizontal line. The next domino will be placed vertically, covering two horizontal lines and one vertical line. In total, these two dominoes will cover 3 horizontal lines and 3 vertical lines (see figure). We will place such small squares along the diagonal of the large square - as many as will fit. There will be $2015: 3=671$ (remainder 2).

![](https://cdn.mathpix.com/cropped/2024_05_06_5e5226a421e9322bcec8g-2.jpg?height=696&width=694&top_left_y=1965&top_left_x=293)

In total, there will be 671 squares, which contain $671 \cdot 2$ dominoes and cover all vertical and horizontal lines in the $2013 \times 2013$ square. The remaining $2 \times 2$ square, which is not covered, is covered by two dominoes. Therefore, a total of $671 \cdot 2 +$ $2=1344$ dominoes are required.

Answer: 1344 dominoes.