#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#pragma warning(disable:4996)
typedef struct
{
int mark[3];
char stuNum[10];
char stuName[15];
}StudentInfoTypedef;
int main() {
StudentInfoTypedef student[5];
StudentInfoTypedef bestStudent = { 0 };
int i = 0,j = 0, sum = 0, maxMark = 0;
float average = 0;
for (i = 0; i < 5; i++)
{
scanf("%s %s %d %d %d", student[i].stuNum, student[i].stuName,
&student[i].mark[0], &student[i].mark[1], &student[i].mark[2]);
for (j = 0; j < 3; j++)
{
sum += student[i].mark[j];
}
average += sum;
if (sum > maxMark)
{
maxMark = sum;
memcpy(&bestStudent, &student[i], sizeof(StudentInfoTypedef));
}
sum = 0;
}
average /= 15.0;
printf("%.2f\n%s %s %.2f %.2f %.2f %.2f", average, bestStudent.stuNum, bestStudent.stuName,
(float)bestStudent.mark[0], (float)bestStudent.mark[1], (float)bestStudent.mark[2],
((float)bestStudent.mark[0] + (float)bestStudent.mark[1] + (float)bestStudent.mark[2]) / 3.0);
}