#include <stdio.h>
#define N 10
struct student
{
int num;
char name[30];
int score[3];
int ave;
}
input(struct student s[])
{
int i;
for(i=0;i<N;i++)
{
scanf("%d %s %d %d %d",&s[i].num,s[i].name,&s[i].score[1],&s[i].score[2],&s[i].score[3]);
}
}
float average(struct student s[])
{
int i,sum=0;
float ave1=0.00;
for(i=0;i<N;i++)
{
sum+=s[i].score[1] + s[i].score[2] + s[i].score[3];
}
ave1 = sum/(3.00*N);
return ave1;
}
int max(struct student s[])
{
int i,j,k,m,sum,sum1;
for(i=0;i<N-1;i++)
{
sum=s[i].score[1] + s[i].score[2] + s[i].score[3];
m=sum;
for(j=1;j<N;j++)
{ sum1=s[j].score[1] + s[j].score[2] + s[j].score[3];
if(sum < sum1)
{ m=sum1;
k=j;
}
}
return k;
}
}
main()
{ struct student a[N];
int n;
float b,ave;
input(a);
b=average(a);
printf("总平均分:%.2f\n",b);
n=max(a);
ave=(a[n].score[1]+a[n].score[2]+a[n].score[3])/3.00;
printf("最高成绩者:%-3d %s %-3d %-3d %-3d %.2f",a[n].num,a[n].name,a[n].score[1],a[n].score[2],a[n].score[3],ave);
}