Cod sursa(job #638895)

Utilizator CBogdanCiobanu Bogdan CBogdan Data 21 noiembrie 2011 20:39:07
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb
#include<cstdio>
using namespace std;

int n,m,x,y,t;

void read(),solve();

int main()
{
	read();
	solve();
	
	return 0;
}

void read()
{
	freopen("chatnoir.in","r",stdin);
	freopen("chatnoir.out","w",stdout);
	scanf("%d",&t);
}

void solve()
{
	for(;t;t--)
	{
		scanf("%d%d%d%d",&n,&m,&x,&y);
		if(x<6 || y<6 || (n-x)<5 || (m-y)<5)
			printf("DA\n");
		else printf("NU\n");
	}
}