solution
总成绩= (老师成绩 + 同学去掉最高分去掉最低分的平均分)/2,其中总成绩四舍五入取整
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n, m, worst, better, sum, g, x, cnt;
scanf("%d%d", &n, &m);
for(int i = 0; i < n; i++){
scanf("%d", &g);
worst = m + 1;
better = -1;
sum = cnt = 0;
for(int j = 0; j < n - 1; j++){
scanf("%d", &x);
if(x >= 0 && x <= m){
cnt++;
sum += x;
worst = min(worst, x);
better = max(better, x);
}
}
printf("%d\n", ((sum - worst - better) / (cnt - 2) + g + 1) / 2);
}
return 0;
}