样例过了,但是爆0,全WA了呜呜呜!!!
#include <bits/stdc++.h>
using namespace std;
int n;
class Student
{
public:
string s;
int a, b, c, z;
};
void solve(void)
{
cin >> n;
Student maxn;
for (int i = 1; i <= n; i++)
{
Student a;
cin >> a.s >> a.a >> a.b >> a.c;
a.z = a.a + a.b + a.c;
if (a.z > maxn.z)
{
maxn = a;
}
}
cout << maxn.s << ' ' << maxn.a << ' ' << maxn.b << ' ' << maxn.c;
return;
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
solve();
return 0;
}
我是被深基迫害重写这题的呜呜呜