Cod sursa(job #636098)

Utilizator ProtomanAndrei Purice Protoman Data 19 noiembrie 2011 17:00:23
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda .com 2011 Marime 0.39 kb
#include <algorithm>
#include <iostream>
#include <fstream>

using namespace std;

int main()
{
	ifstream cin("chatnoir.in");
	ofstream cout("chatnoir.out");

	int testCases;
	for (cin >> testCases; testCases; testCases--)
	{
		int n, m, x, y;
		cin >> n >> m >> x >> y;

		if (x < 6 || y < 6 || x > n - 5 || y > m - 5)
			cout << "DA\n";
		else cout << "NU\n";
	}

	return 0;
}