P5738 [Deep Basics 7. Example 4] Singing Contest

Description

$n(n\le 100)$ students take part in a singing contest and receive scores from $m(m\le 20)$ judges. The score range is from $0$ to $10$. A student’s final score is obtained by removing the highest score and the lowest score among the judges’ scores, then taking the average of the remaining $m-2$ scores. What is the highest final score among all students? Keep the score to $2$ decimal places.

Input Format

The first line contains two integers $n,m$. The next $n$ lines each contain $m$ integers, representing the scores.

Output Format

Output the highest final score among the students, rounded to two decimal places.

Explanation/Hint

Translated by ChatGPT 5