Cod sursa(job #3363121)

Utilizator CorvinJudge0Corvin Judge CorvinJudge0 Data 14 august 2026 09:37:18
Problema ChatNoir Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.4 kb
#include <fstream>
using namespace std;
ifstream fin ("chatnoir.in");
ofstream fout ("chatnoir.out");
int main()
{
    int t;
    fin >> t;
    while (t--)
    {
        int n,m,x,y;
        fin >> n >> m >> x >> y;
        if (min(min(n-x,x-1),min(m-y,y-1))<=4)
        {
            fout << "DA" << '\n';
        }
        else
        {
            fout << "NU" << '\n';
        }
    }
    return 0;
}