Cod sursa(job #954630)

Utilizator ScoobyDoo38Nita Adrian Valentin ScoobyDoo38 Data 29 mai 2013 18:45:01
Problema ChatNoir Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.39 kb
#include <fstream>

using namespace std;

int main()
{
	ifstream fin( "chatnoir.in" );
	ofstream fout( "chatnoir.out" );

	int t = 0;

	fin >> t;

	short n = 0, m = 0, x = 0, y = 0;

	for ( int i = 0; i < t; i += 1 )
	{
		fin >> n >> m >> x >> y;

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