10.4. At competitions, an athlete's performance is evaluated by 7 judges, each of whom gives a score (an integer from 0 to 10). To obtain the final score, the best and worst scores from the judges are discarded, and the arithmetic mean is calculated. If the average score were calculated based on all seven scores, the athletes would be ranked in the exact reverse order. What is the maximum number of athletes that could have participated in the competition?
# Answer. 5.

Solution. Suppose there are no fewer than six dancers. Let $A, a, S_{A}$ be the best score, the worst score, and the sum of all non-discarded scores of the winner, respectively, and $B, b, S_{B}$ be the same for the last athlete. Instead of averages, we can arrange the dancers by the sum of all scores or the sum of all except the extreme ones. From the condition, it follows that such sums are different for all and go in the opposite order. Since the sums are integers and there are at least six dancers, the inequalities must hold:

$$
S_{A}-S_{B} \geq 5 \text { and }\left(B+b+S_{B}\right)-\left(A+a+S_{A}\right) \geq 5 \text {. }
$$

Adding these inequalities, we get $B+b-A-a \geq 10$.

From this, $b \geq A+a+(10-B) \geq A$, i.e., the worst score of the last athlete is not less than the best score of the winner. But then each score of the last athlete is not less than that of the winner, i.e., $S_{B} \geq S_{A}$. We have reached a contradiction.

Example of score distribution among athletes: $0-0-0-0-0-0-10,0-0-0-0-0-1-8$, $0-0-0-0-1-1-6,0-0-0-1-1-1-4,0-0-1-1-1-1-2$.

Comment. Example - 3 points, evaluation - 4 points.