logo AlgoBeat OnlineJudge
登录 注册

题解

作者: tyxx040105  ·  发布于 2026-07-25 17:28:32  ·  最后修改于 2026-07-25 18:06:07
已通过
审核员:Carey_chen HCl · 2026-07-25 18:06:07

模拟即可。

#include<bits/stdc++.h>
using namespace std;
long long a[10000],n,m,maxx=INT_MIN,cnt=-1;
int main(){
    for(int i=1;i<=7;i++){
        cin>>n>>m;
        a[i]=n+m;
        if(a[i]>8 && a[i]>maxx){
            maxx=a[i];
            cnt=i;
        }
    }
    if(maxx==INT_MAX) cout<<0;
    else cout<<cnt;
    return 0;
}

暂无评论

登录 后即可评论。