Cricket Tournament I Codechef Solution || Codechef contest solution

,

#include <iostream>
using namespace std;

int main() {
    int T;
    cin >> T;

    while (T--) {
        int N, M;
        cin >> N >> M;

        // Check if it's possible for the tournament to be interesting
        if (N <= 1 || M < N - 1) {
            cout << "NO" << endl;
        } else {
            cout << "YES" << endl;
        }
    }

    return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *