Cod sursa(job #1309496)
Utilizator | Laura Georgescu laurageorgescu | Data | 5 ianuarie 2015 19:52:00 |
---|---|---|---|
Problema | ChatNoir | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.4 kb |
#include<fstream>
using namespace std;
ifstream fin( "chatnoir.in" );
ofstream fout( "chatnoir.out" );
int main() {
int q, x, y, l, c;
fin >> q;
while ( q -- ) {
fin >> l >> c >> x >> y;
if ( x <= 5 || y <= 5 || l - x <= 4 || c - y <= 4 ) {
fout << "DA\n";
} else {
fout << "NU\n";
}
}
fin.close();
fout.close();
return 0;
}