Cod sursa(job #1767162)

Utilizator danster99Niculae Dan Andrei danster99 Data 28 septembrie 2016 19:19:34
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.41 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream in("chatnoir.in");
ofstream out("chatnoir.out");
int main()
{
    int m,n,t,x,y,i,ok=0;
    in>>t;
    for(i=1;i<=t;i++)
    {
        ok=0;
        in>>n>>m>>x>>y;
        if(x<=5||y<=5||n-x+1<=5||m-y+1<=5)
            {
            out<<"DA"<<"\n";
            ok=1;
            }
        if(ok==0)
            out<<"NU"<<"\n";

    }
    return 0;
}