Cod sursa(job #999360)

Utilizator florin.elfusFlorin Elfus florin.elfus Data 19 septembrie 2013 23:31:27
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb
#include <stdio.h>

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

    freopen ("chatnoir.in", "r", stdin);
    freopen ("chatnoir.out", "w", stdout);

    scanf ("%d", &Q);
    while (Q --)
    {
        scanf ("%d%d%d%d", &N, &M, &x, &y);
        if (x <= 5 || y <= 5 || N - 4 <= x || M - 4 <= y)
            printf ("DA\n");
        else
            printf ("NU\n");
    }

    return 0;
}