CHAAT1 - Editorial

PROBLEM LINK:

Contest

Author: inclusiveor
Tester: inclusiveor
Editorialist: inclusiveor

DIFFICULTY:

CAKEWALK

PREREQUISITES:

None

PROBLEM:

You and your friend can eat a maximum of A and B mini puris. You must check if your team can beat the current record of N mini puris eaten

EXPLANATION:

Check if the combined sum is greater than N, i.e., A + B > N and print YES or NO accordingly.

SOLUTION:

Setter's Solution
    #include "bits/stdc++.h"
    #define int long long
    #define rep(x, a, b) for (int x = a; x < b; ++x)
    
    using namespace std;
    using vi = vector<int>;
    using vvi = vector<vi>;
    using pii = pair<int, int>;
    
    const int INF = numeric_limits<int>::max();
    
    void solve() {
        int N, A, B;
        cin >> N >> A >> B;
    
        cout << (A + B > N ? "YES" : "NO") << "\n";
    }
    
    signed main() {
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
    
        int T;
        cin >> T;
        while (T--) solve();
    
        return 0;
    }