Cod sursa(job #1502103)

Utilizator tamionvTamio Vesa Nakajima tamionv Data 14 octombrie 2015 10:33:58
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include <fstream>
using namespace std;

int main(){
	ifstream f("chatnoir.in");
	ofstream g("chatnoir.out");
	int t;
	f >> t;
	for(int i = 0, n, m, x, y; i < t; ++i){
		f >> n >> m >> x >> y;
		g << (((x-1) <= 4 || (n-x) <= 4 || (y-1) <= 4 || (m-y) <= 4)
			? "DA" : "NU") << '\n'; }
	return 0; }