vckk @ 2023-11-06 10:29:14
#include<stdio.h>
#include<string.h>
int main()
{
int n;
int i,j;
int sum;
int max=0;
int a,b,c,x,y,z;
char s[9],ss[9];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s %d %d %d",&s,&a,&b,&c);
sum=a+b+c;
if(sum>max){
max=sum;
for(j=0;j<strlen(s);j++){
ss[j]=s[j];
}
x=a;
y=b;
z=c;
}
}
printf("%s %d %d %d",ss,x,y,z);
return 0;
}