1132wang @ 2020-03-30 21:38:15
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<stdbool.h>
typedef struct score
{
char name[10];
int Chinese;
int English;
int math;
}Score;
int main()
{
int n,i,j;
int max=0;
int count=0;
Score a[1005]={{},0,0,0};
scanf("%d",&n);
for(i=0;i<n;i++)
{
getchar();
for(j=0;j<10;j++)
{
scanf("%c",&a[i].name[j]);
if(a[i].name[j]==' ')
{
a[i].name[j]='\0';
break;
}
}
scanf("%d%d%d",&a[i].Chinese,&a[i].math,&a[i].English);
if(max<a[i].Chinese+a[i].math+a[i].English)
{
max=a[i].Chinese+a[i].math+a[i].English;
count=i;
}
}
printf("%s %d %d %d ",a[count].name,a[count].Chinese,a[count].math,a[count].English);
return 0;
}
by songxiao @ 2020-03-31 11:15:32
能过了 https://www.luogu.com.cn/record/32334622
by songxiao @ 2020-03-31 11:16:24
(好不容易找到了一个比我蒻的可以帮忙的,这是我第一次帮别人
by 1132wang @ 2020-03-31 11:29:00
@Gorilla 卧槽AC了。。。感激不尽
by 1132wang @ 2020-03-31 11:29:26
@Gorilla 哈哈我很菜的一起努力