S_mz @ 2024-05-25 16:08:56
#include<bits/stdc++.h>
using namespace std;
int main(){
string s,name;
int sum=0,n,yu,shu,ying,a,b,c;
cin>>n;
for(int i=1;i<=n;i++){
cin>>name;
cin>>yu>>shu>>ying;
if(yu+shu+ying>sum){
sum=yu+shu+ying;
s=name;
a=yu;
b=shu;
c=ying;
}
}
cout<<s<<' '<<a<<' '<<b<<' '<<c;
return 0;
}
by mairuisheng @ 2024-06-09 20:00:15
@S_mz 是不是发错代码啦?