mediocre_ @ 2022-03-04 07:09:01
#include<bits/stdc++.h>
using namespace std;
struct x{
string name;
int chinese,maths,English;
}a,ans;
int main(){
int n;
scanf("%d",&n);
for (int i = 1;i <= n;++i){
cin>>a.name>>a.chinese>>a.maths>>a.English;
if (a.chinese+a.maths+a.English > ans.chinese+ans.maths+ans.English){
ans = a;
}
}
cout<<ans.name<<" "<<ans.chinese<<" "<<ans.maths<<" "<<ans.English;
return 0;
}
by Nygglatho @ 2022-03-04 16:50:37
@Mr_Huang12 注意特判