//#define LOCAL
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <cctype>
#include <sstream>
#define inf 0x3f3f3f3f
#define eps 1e-6
using namespace std;
#define clr(x) memset(x,0,sizeof((x)))
const int maxn = 1e5+1;//2e6+1
#define MAX(a,b,c) ((a)>(b)?((a)>(c)?(a):(c)):((b)>(c)?(b):(c)))
#define _max(a,b) ((a) > (b) ? (a) : (b))
#define _min(a,b) ((a) < (b) ? (a) : (b))
#define _for(a,b,c) for(int a = b;a<c;a++)
int main()
{
#ifdef LOCAL
freopen("data.in","r",stdin);
freopen("data.out","w",stdout);
#endif
int n,m;
double ans = -inf,as,score;
cin>>n>>m;
for(int i = 0;i<n;i++) {
double ts = 0,ma = -inf,mi = inf;
as = 0;
for(int j = 0;j<m;j++) {
cin>>score;
ts+=score;
ma = _max(ma,score);
mi = _min(mi,score);
}
as = (ts-ma-mi)/(m-2);
ans = _max(ans,as);
}
printf("%.2lf",ans);
return 0;
}
02-09
395
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)