Cod sursa(job #637035)

Utilizator iulishorIulian Popescu iulishor Data 20 noiembrie 2011 10:38:28
Problema ChatNoir Scor 0
Compilator cpp Status done
Runda .com 2011 Marime 0.32 kb
#include <fstream>
#include <cmath>
using namespace std;
int t;
int main()
{
	ifstream fin("chatnoir.in");
	ofstream fout("chatnoir.out");
	fin>>t;
	for(;t;--t)
	{
		int x,y,n,m;
		fin>>n>>m>>x>>y;
		if(x<4 || y<4)
			fout<<"DA\n";
		else
			if(n-x<4 || m-y<4)
				fout<<"DA\n";
			else
				fout<<"NU\n";
	}
}