Cod sursa(job #637654)

Utilizator SmarandaMaria Pandele Smaranda Data 20 noiembrie 2011 15:46:36
Problema ChatNoir Scor 0
Compilator cpp Status done
Runda .com 2011 Marime 0.33 kb
#include<cstdio>
using namespace std;
int main() {
	long n,t,m,x,y,i;
	
	freopen("chatnoir.in","r",stdin);
	freopen("chatnoir.out","w",stdout);
	
	scanf("%ld",&t);
	for (i=1;i<=t;i++) {
		scanf("%ld%ld%ld%ld",&n,&m,&x,&y);
		if (x==1 || x==n || y==1 || y==m)
			printf("DA\n");
		else
			printf("NU\n");
	}
	return 0;
}