Cod sursa(job #1316396)

Utilizator heracleRadu Muntean heracle Data 13 ianuarie 2015 19:51:10
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.52 kb
#include <cstdio>

FILE* in=fopen("chatnoir.in","r");
FILE* out=fopen("chatnoir.out","w");

int main()
{
    int t;

    fscanf(in,"%d",&t);

    int l,c,x,y;

    bool NU;

    for(int i=1; i<=t; i++)
    {
        fscanf(in,"%d%d%d%d",&l,&c,&x,&y);

        NU=1;

        if(l-x<5)
            NU=0;
        if(x-1<5)
            NU=0;
        if(c-y<5)
            NU=0;
        if(y-1<5)
            NU=0;

        if(NU)
            fprintf(out,"NU\n");
        else
            fprintf(out,"DA\n");

    }

    return 0;
}