Cod sursa(job #1990618)

Utilizator Moise_AndreiMoise Andrei Moise_Andrei Data 12 iunie 2017 19:40:03
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.42 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream in("chatnoir.in");
ofstream out("chatnoir.out");
int main()
{
    int n;
    in >> n;
    for(int i = 1; i <= n; i++)
    {
        int a, b, c, d;
        in >> a >> b >> c >> d;
        if(a - c + 1 <= 5 || b - d + 1 <= 5 || c <= 5 || d<= 5)
            out << "DA" << '\n';
        else
            out << "NU" << '\n';
    }
    return 0;
}