Cod sursa(job #637399)

Utilizator crushackPopescu Silviu crushack Data 20 noiembrie 2011 14:16:31
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda .com 2011 Marime 0.34 kb
#include <stdio.h>

const char IN[]="chatnoir.in",OUT[]="chatnoir.out";

int Tes;
int N,M,X,Y;

int main()
{
	freopen(IN,"r",stdin);
	scanf("%d",&Tes);
	freopen(OUT,"w",stdout);
	while (Tes--)
	{
		scanf("%d%d%d%d",&N,&M,&X,&Y);
		printf("%s\n", X<=5 || Y<=5 || N-X+1<=5 || M-Y+1<=5 ? "DA" : "NU");
	}
	fclose(stdout);fclose(stdin);
	return 0;
}