为什么显示提交失败
查看原帖
为什么显示提交失败
526938
_hello_w_楼主2021/11/25 13:16

`

# include <bits/stdc++.h>
using namespace std;

struct student
{
	string name;
	int y,s,w;
}s[1005];
int n,maxx,t;
int main()
{
	cin>>n;
	for (int i = 0; i < n; i++)
	{
		cin>>s[i].name>>s[i].y>>s[i].s>>s[i].w;
		if (maxx < s[i].y + s[i].s + s[i].w) 
		{
			maxx = s[i].y + s[i].s + s[i].w;
			t = i;
		}
	}
	cout<<s[t].name<<" "<<s[t].y<<" "<<s[t].s<<" "<<s[t].w;
	return 0;
}
2021/11/25 13:16
加载中...