为什么显示提交失败

P5740 【深基7.例9】最厉害的学生

_hello_w_ @ 2021-11-25 13:16:27

`

# 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;
}

by DaShaber @ 2021-11-25 22:09:16

@壮壮130531 ?为什么要@ 我啊


by _hello_w_ @ 2021-11-26 13:37:51

@tzc_2012_awa 感觉你水平高,谢谢


上一页 |