Cod sursa(job #637285)

Utilizator elfusFlorin Chirica elfus Data 20 noiembrie 2011 13:38:24
Problema Minesweeper Scor 0
Compilator cpp Status done
Runda .com 2011 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 <= 3 || y <= 3 || N - x <= 3 || N - y <= 3)
            printf ("DA\n");
        else
            printf ("NU\n");
    }

    return 0;
}