```C++
#include <bits/stdc++.h>
using namespace std;
int n,m;
double sum(int num[])
{
double sumn=0;
sort(num+1,num+(m+1));
for(int i=2;i<=(m-1);++i)
{
sumn+=num[i];
}
double x=sumn/(m-2);
return x;
}
int main()
{
int num[100];double a[100];
cin>>n>>m;
for(int i=1;i<=n;++i)
{
for(int j=1;j<=m;++j)
{
cin>>num[j];
}
a[i]=sum(num);
}
sort(a+1,a+n+1);
printf("%.2lf",a[n]);
return 0;
}
```
by Furthe77oad @ 2022-09-20 21:41:21