```
#include <iostream>
#include <iomanip>
#include <bits/stdc++.h>
using namespace std;
int n,m,ans,sum,i,j,a[300000];
double ma=-100000.00;
int main()
{
cin>>n>>m;
for(int i=1;i<=n;i++)
{
sum=0;
for(int j=1;j<=m;j++){
cin>>a[j];
}
sort(a+1,a+m+1);
for(int j=2;j<=m-1;j++)
{
sum+=a[j];
}
double s=sum*1.0/(m-2);
ma=max(ma,s);
}
printf("%.2lf",ma);
return 0;
}
```
by Renyaoyao @ 2024-10-25 22:48:39
@[CCF___NOI](/user/1394890) sum多测不清空,亲友两行泪
by Renyaoyao @ 2024-10-25 22:49:23
@[CCF___NOI](/user/1394890) 没看到吗
by Renyaoyao @ 2024-10-27 09:01:11