AtCoder Beginner Contest 466

链接:https://atcoder.jp/contests/abc466

A - Compromise

涉及知识:无

思路:判断有无非负数即可

Code
点击查看代码
void solve()
{
    cin >> n;
    vi a(n + 1);
    int ok = 0;
    for (int i = 1; i <= n; i++)
    {
        cin >> a[i];
        if (a[i] >= 0)
        {
            ok = 1;
        }
    }
    if (ok)
    {
        cout << "No" << endl;
    }
    else
    {
        cout << "Yes" << endl;
    }
}

B - Representative Balls

涉及知识:

posted @ 2026-07-23 17:55  Lambda_L  阅读(2)  评论(0)    收藏  举报