#P5738. Highest Average Score in Singing Competition
Highest Average Score in Singing Competition
Highest Average Score in Singing Competition
There are \( n \) students (with \( n \leq 100 \)) participating in a singing competition and \( m \) judges (with \( m \leq 20 \)) scoring their performance. Each judge gives a score between \( 0 \) and \( 10 \). For each student, the final score is computed by discarding the highest score and the lowest score, and then taking the average of the remaining \( m-2 \) scores.
Formally, if a student receives scores \( s_1,s_2,\dots,s_m \), after sorting these scores, let \( s_{min} \) and \( s_{max} \) be the minimum and maximum scores respectively. The final score is given by:
\[
\text{score} = \frac{\sum_{i=2}^{m-1} s_i}{m-2}
\]
Your task is to determine the highest final score among all students and print it rounded to 2 decimal places.
inputFormat
The first line contains two integers \( n \) and \( m \) representing the number of students and judges, respectively. Each of the following \( n \) lines contains \( m \) space-separated numbers indicating the scores given by the judges for that student.
outputFormat
Output a single line containing the highest final score among the students, printed to 2 decimal places.
sample
1 3
5 6 10
6.00