```cpp
#include<bits/stdc++.h>
using namespace std;
int a[10000];
double pf(int x){
sort(a+1,a+x+1);
double ans = 0;
for(int i = 2;i<=x-1;i++){
ans += a[i];
}ans = ans*1.0/(x-2);
return ans;
}
int main(){
int m;
int n;
cin>>n>>m;
double ma = -1e9;
for(int i = 1;i<=n;i++){
for(int j = 1;j<=m;j++){
cin>>a[j];
}double y = pf(m);
if(ma<y){
ma = y;
}
}printf("%.2lf",ma);
return 0;
}
```
删掉18行,数组每次输入会自动覆盖
by WXX532 @ 2024-07-09 14:32:42
~~但不改也没错啊~~
by WXX532 @ 2024-07-09 14:34:08
试着用c++11开启O2优化
by WXX532 @ 2024-07-09 14:41:08
求壶关
by WXX532 @ 2024-07-09 15:21:18