@[ITProgrammer](/user/196318)
```cpp
double tot=0;
by Cstdio_Rabbit @ 2021-09-04 21:21:20
@[ITProgrammer](/user/196318)
```cpp
#include <bits/stdc++.h>
using namespace std;
int a[101][21];
int n,m;
int main()
{
cin>>n>>m;
double ans=0.0;
for(int i=1;i<=n;i++)
{
int maxn=INT_MIN,minn=INT_MAX;
double tot=0;
for(int j=1;j<=m;j++)
{
cin>>a[i][j];
tot+=a[i][j];
if(a[i][j]>maxn)
maxn=a[i][j];
if(a[i][j]<minn)
minn=a[i][j];
}
tot=tot-maxn-minn;
tot=tot*1.0/(m-2);
if(tot>ans)
ans=tot;
}
cout<<fixed<<setprecision(2)<<ans<<endl;
return 0;
}
by Cstdio_Rabbit @ 2021-09-04 21:22:11
@[zswmb](/user/235901) 感谢
by ITProgrammer @ 2021-09-10 20:45:58
【已解决】
by ITProgrammer @ 2021-09-10 20:51:56