# Problem 6. (3 points)

In an $8 \times 10$ table (8 rows, 10 columns), some cells are black, and the rest are white. In each white cell, the total number of black cells in the same row is written; nothing is written in the black cells. What is the maximum value that the sum of the numbers in the entire table can take?
Answer: 200

## Solution:

If a row contains $x$ black cells and $10-x$ white cells, then the sum of the horizontal terms in this row is $x(10-x)$. This value is maximized when $x=5$ and equals 25. This can be understood as $x(10-x)-25=-x^{2}+10 x-25=-(x-5)^{2}$. Therefore, the maximum sum of all numbers is $8 \cdot 25=200$. An example is easily constructed.