B4. We consider $5 \times 5$ tables with 25 numbers written in them. The same number can appear multiple times, but in no row or column does the same number appear five times. We call such a table beautiful if in each row the middle number is the average of the numbers in that row, and in each column the middle number is the average of the numbers in that column. The score of a beautiful table is the number of numbers in the table that are smaller than the number that is exactly in the middle of the table.

What is the smallest possible score of a beautiful table?
B4. 3

We first show that every beautiful table has a score of at least 3. Consider such a table and let the number exactly in the middle be $a$. The five numbers in the middle row have $a$ as their average and are not all equal to $a$. At least one of these five numbers must therefore be smaller than $a$. Similarly, (at least) one of the five numbers in the middle column must be smaller than $a$, say the number $b$. Since $b$ is the average of the numbers in its row, one of the five numbers in this row is smaller than $b$ and thus also smaller than $a$. We have now found three numbers in different positions in the table, each smaller than the number exactly in the middle. The score is therefore at least 3.

In the figure on the right, you can see that there exists a beautiful table with a score of 3. A score of 3 is thus the lowest possible score.

| 4 | 4 | 3 | 4 | 0 |
| ---: | ---: | ---: | ---: | ---: |
| 4 | 4 | 3 | 4 | 0 |
| 3 | 3 | 0 | 3 | -9 |
| 4 | 4 | 3 | 4 | 0 |
| 0 | 0 | -9 | 0 | -36 |