Cod sursa(job #640587)

Utilizator alex_mircescuAlex Mircescu alex_mircescu Data 25 noiembrie 2011 23:39:23
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include <stdio.h>
#include <math.h>

long t, x, y, n, m;

int main() {
	freopen("chatnoir.in", "r", stdin);
	freopen("chatnoir.out", "w", stdout);
	
	scanf("%ld", &t);
	for (long i = 1; i <= t; ++i) {
		scanf("%ld %ld %ld %ld", &n, &m, &x, &y);
		if (x < 6 || y < 6 || x > n - 5 || y > m - 5) printf("DA\n");
		else printf("NU\n");
	}
	
	return 0;
}