7. On a 5 by 5 board, a certain number of bishops and knights were placed. Then, they counted how many times each bishop is attacked, and all the obtained numbers were added together. What is the maximum sum that could have been obtained?

#
# Solution:

Answer: 80.

The example is constructed through a chessboard coloring - bishops on one color, rooks on the other.

Evaluation: First, place bishops everywhere. The total sum will be 64. Now, in each cell, write the number of points that can be gained by replacing a bishop with a knight. We will get the following table:

| 1 | 1 | 2 | 1 | 1 |
| :--- | :--- | :--- | :--- | :--- |
| 1 | 0 | 2 | 0 | 1 |
| 2 | 2 | 4 | 2 | 2 |
| 1 | 0 | 2 | 0 | 1 |
| 1 | 1 | 2 | 1 | 1 |

Divide this table into 4 smaller tables:

| 1 | 1 | 1 |
| :--- | :--- | :--- |
| 1 | 0 | 1 |
| 1 | 1 | 1 |

In each of these smaller tables, we can definitely get no more than 4 points, as the cells with 1 can be paired by a knight's move. Therefore, we can gain no more than 16 additional points by replacing bishops with knights.

Criteria for determining winners and prize winners of the final stage of the Youth Mathematical School Olympiad, 2015-16.

Each problem is worth 1 point.

For 4th grade:

A winner is a participant who solves 6 problems.

A prize winner is a participant who solves at least 4 problems.

For 5th grade:

A winner is a participant who solves at least 6 problems.

A prize winner is a participant who solves at least 4 problems.

For 6th grade:

A winner is a participant who solves 7 problems.

A prize winner is a participant who solves at least 5 problems.

For 7th grade:

A winner is a participant who solves 7 problems.

A prize winner is a participant who solves at least 5 problems.

For 8th grade:

A winner is a participant who solves 6 problems.

A prize winner is a participant who solves at least 4 problems.

For 9th grade:

A winner is a participant who solves 8 problems.

A prize winner is a participant who solves at least 6 problems.

For 10th grade:

A winner is a participant who solves 9 problems.

A prize winner is a participant who solves at least 5 problems.

For 11th grade:

A winner is a participant who solves 7 problems.

A prize winner is a participant who solves at least 5 problems.