Cod sursa(job #2239972)

Utilizator TudoseSanzianaTudose Sanziana TudoseSanziana Data 12 septembrie 2018 09:02:35
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.38 kb
#include <fstream>
using namespace std;

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

int t, n, m, x, y;

int main()
{
    in >> t;

    while(t--)
    {
        in >> n >> m >> x >> y;

        if(n - x + 1 <= 5 || m - y + 1 <= 5 || x <= 5 || y <= 5)
            out << "DA" << '\n';
        else
            out << "NU" << '\n';
    }

    return 0;
}