Cod sursa(job #3363112)

Utilizator CorvinJudge0Corvin Judge CorvinJudge0 Data 14 august 2026 09:29:55
Problema ChatNoir Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.45 kb
#include <bits/stdc++.h>
using namespace std;

void Solve() {
    int n, m, x, y; cin >> n >> m >> x >> y;
    if (min({x - 1, y - 1, n - x, n - y}) <= 4) {
        cout << "DA\n";
    } else {
        cout << "NU\n";
    }
}

signed main() {
#ifndef LOCAL
    cin.tie(nullptr)->sync_with_stdio(false);
    freopen("chatnoir.in", "r", stdin);
    freopen("chatnoir.out", "w", stdout);
#endif

    int t; cin >> t;
    while (t--)
        Solve();

    return 0;
}