YYaini @ 2023-05-19 16:43:22
#include<bits/stdc++.h>
using namespace std;
struct pop
{
string a;
int b,c,d;
int sum=0;
}
n[1001];
int main()
{
int g;
cin>>g;
for(int i=0;i<g;i++)
cin>>n[i].a>>n[i].b>>n[i].c>>n[i].d;
for(int i=0;i<g;i++)
n[i].sum=n[i].b+n[i].c+n[i].d;
int ll;
for(int i=0;i<g;i++)
{
if(n[i].sum>ll)
ll=n[i].sum;
}
for(int i=0;i<g;i++)
{
if(n[i].sum==ll)
{
cout<<n[i].a<<" "<<n[i].b<<" "<<n[i].c<<" "<<n[i].d;
return 0;
}
}
}
by ForgotDream_CHN @ 2023-05-19 16:58:12
@YYaini ll
初始化
by YYaini @ 2023-05-19 17:03:26
@ForgotDream_CHN 谢谢!