```cpp
#include<stdio.h>
#include<math.h>
int m,n,min=2147483647,max,i,j,acc,score[20],total_sco=0,sum;
float aver,high_score=0.00;
int main()
{
scanf(" %d %d ", &n, &m);
acc = m - 2;
for( i=0; i<n; i++)
{
sum=0;
min=2147483647,max=-1;
for(j=0; j<m; j++) //算出每个同学的平均分;
{
scanf(" %d ", &score[j]);
if( score[j] > max)
{
max = score[j];
}
if( score[j] < min)
{
min = score[j];
}
sum+=score[j];
}
total_sco = sum - max - min;
aver = total_sco / (float)acc;
if(aver >high_score)
{
high_score = aver;
}
}
printf("%.2f ",high_score);
}
```
by Elairin176 @ 2022-10-06 12:39:25
@[kickfox](/user/799480) 改好了
by Elairin176 @ 2022-10-06 12:39:46
@[__dest__ruct__or__](/user/592238)
谢谢
by kickfox @ 2022-10-06 14:06:57