Cod sursa(job #3359996)

Utilizator serbanbBrindescu Serban serbanb Data 7 iulie 2026 16:42:51
Problema ChatNoir Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.47 kb
#include <fstream>

using namespace std;

ifstream fin("chatnoir.in");
ofstream fout("chatnoir.out");

int t;
int n,m;

int main()
{
    fin >> t;
    for(int i = 0; i < t; ++i){
        fin >> n >> m;
        int x,y;
        fin >> x >> y;
        int d = min(min(x - 1, n - x), min(y - 1, m - y));
        if(d <= 4){
            fout << "DA";
        }
        else{
            fout << "NU";
        }
        fout << '\n';
    }
    return 0;
}