Cod sursa(job #2239985)

Utilizator teonubixteo bunea teonubix Data 12 septembrie 2018 09:22:20
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.38 kb
#include <fstream>
using namespace std;

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

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


    return 0;
}