解题思路:水题
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int inf=0x3f3f3f3f;
int s[20];
int p[10009];
bool cmp(int &a,int &b)
{
return a>b;
}
int main()
{
//freopen("t.txt","r",stdin);
int ans,mi,ma,n,k,m;
scanf("%d%d%d",&n,&k,&m);
for(int i=0;i<n;i++)
{
ans=0;mi=inf;ma=-1;
for(int j=0;j<k;j++)
{
scanf("%d",&s[j]);
ans+=s[j];
mi=min(s[j],mi);
ma=max(ma,s[j]);
}
ans=ans-mi-ma;
p[i]=ans;
}
sort(p,p+n,cmp);
for(int i=m-1;i>=0;i--)
{
printf("%.3lf",p[i]*1.0/(k-2));
if(i!=0) printf(" ");
}
return 0;
}