Cod sursa(job #761927)
| Utilizator | Data | 27 iunie 2012 21:00:30 | |
|---|---|---|---|
| Problema | ChatNoir | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.44 kb |
#include <cstdio>
using namespace std;
int main()
{
freopen("chatnoir.in","r",stdin);
freopen("chatnoir.out","w",stdout);
int T,N,M,X,Y;
scanf("%d",&T);
while(T--)
{
scanf("%d %d %d %d",&N,&M,&X,&Y);
if(X<=5 || X>=N-4 || Y<=5 || Y>=M-4) // sunt necesari 4 pasi pentru a acoperi cele 4 colturi
printf("DA\n");
else
printf("NU\n");
}
return 0;
}
