Cod sursa(job #2239984)
Utilizator | Data | 12 septembrie 2018 09:21:16 | |
---|---|---|---|
Problema | ChatNoir | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <fstream>
using namespace std;
ifstream fin("chatnoir.in");
ofstream fout("chatnoir.out");
int main()
{
int n1,n,m,x,y;
fin>>n1;
for(int i=0; i<n1; i++){
fin>>n>>m>>x>>y;
if(x-1<=4||n-x+1<=4||m-y+1<=4||y-1<=4){
fout<<"DA";
}
else
fout<<"NU";
fout<<"\n";
}
return 0;
}