Cod sursa(job #637209)

Utilizator rootsroots1 roots Data 20 noiembrie 2011 13:04:53
Problema ChatNoir Scor 0
Compilator cpp Status done
Runda .com 2011 Marime 0.39 kb
#include <fstream>

using namespace std;

ifstream in;
ofstream out;

int main()
{
    int Test;
    int M,N,x,y;

    in.open("chatnoir.in");
    out.open("chatnoir.out");

    in>>Test;

    for(;Test--;)
    {
        in>>M>>N>>x>>y;
        if(y<5||N-y+1<5||x<5||M-x+1<5) out<<"DA\n";
        else out<<"NU\n";
    }

    in.close();
    out.close();

    return 0;
}