int n;
int m;
cin>>n>>m;
int a[25]={};
double avg_Max=INT_MIN;
for(int i=1; i<=n; i++){
int sum=0;
for(int j=1; j<=m; j++){
cin>>a[j];
sum+=a[j];
}
int Max=MAX(a,m);
int Min=MIN(a,m);
double avg=1.0*(sum-Max-Min)/(m-2);
avg_Max=max(avg_Max,avg);
}
printf("%.2lf",avg_Max);
}
by lhy2012lhy @ 2024-04-05 14:37:19