100pts WA on #12 求助
查看原帖
100pts WA on #12 求助
1061839
upding楼主2024/8/24 22:23
// P1085 [NOIP2004 普及组] 不高兴的津津
// code by:cq_irritater
// time:2023/08/24
#include <bits/stdc++.h>

using namespace std;

int a, b;
int cnt, ans;

int main()
{
    // freopen("code.in", "r", stdin);
    for (int i = 1; i <= 7; i++)
    {
        scanf("%d %d", &a, &b);
        if (a + b >= 8 && a + b > cnt)
        {
            cnt = a + b;
            ans = i;
        }
    }
    if (cnt == 0)
    {
        printf("0");
    }
    else
    {
        printf("%d", ans);
    }
    return 0;
}

回复时麻烦 @ 一下 \bx

2024/8/24 22:23
加载中...