#include<stdio.h>
#include<stdlib.h>
#define maxsize 10050
void MySort(float* b, int n)
{
int i, j;
float m;
for (i = 0; i < n - 1; i++)
for (j = 0; j < n - 1 - i; j++)
if (b[j] > b[j + 1])
{
m = b[j];
b[j] = b[j + 1];
b[j + 1] = m;
}
}
int main()
{
int n, k, m;
scanf("%d%d%d", &n, &k, &m);
int i, j;
float brr[maxsize], arr[maxsize];
for (i = 0; i < n; ++i)
{
for (j = 0; j < k; j++)
{
scanf("%f", &arr[j]);
}
MySort(arr, k);
brr[i] = 0;
for (j = 1; j < k - 1; j++)
{
brr[i] += arr[j];
}
}
MySort(brr, n);
for (i = n - m; i < n - 1; ++i)
{
printf("%.3f ", brr[i] * 1.0 / (k - 2));
}
printf("%.3f", brr[n - 1] * 1.0 / (k - 2));
return 0;
}
|