Cod sursa(job #923815)
Utilizator | Data | 23 martie 2013 21:09:00 | |
---|---|---|---|
Problema | ChatNoir | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <fstream>
using namespace std;
ifstream f("chatnoir.in");
ofstream g("chatnoir.out");
void read(), solve(short n, short m, short x, short y);
int main() {
read();
}
void read() {
short n,m,x,y;
long t;
f>>t;
for(long i=0;i<t;i++)
f>>n>>m>>x>>y,solve(n,m,x,y);
}
void solve(short n, short m, short x, short y) {
if(n-5<x||m-5<y||x<=5||y<=5)
g<<"DA";
else
g<<"NU";
g<<'\n';
}