1 条题解

  • 1
    @ 2025-5-9 16:43:26
    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        int t;
        cin >> t;
        while(t --)
        {
            vector<int> a(3, 0);
            cin >> a[0] >> a[1] >> a[2];
            int sum = accumulate(a.begin(), a.end(), 0);
            if(a[0] > sum / 3 || a[1] > sum / 3)
            {
                cout << "NO" << '\n';
                continue;
            }
            if(sum % 3 == 0) cout << "YES" << '\n';
            else cout << "NO" << '\n';
        }
        return 0;
    }
    
    • 1

    信息

    ID
    5568
    时间
    1000ms
    内存
    256MiB
    难度
    10
    标签
    递交数
    1
    已通过
    1
    上传者