Cod sursa(job #678812)
Utilizator | Data | 12 februarie 2012 14:01:08 | |
---|---|---|---|
Problema | ChatNoir | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <stdio.h>
using namespace std;
int main()
{
FILE*f = fopen("chatnoir.in","r");
int p,n,m,x,y;
fscanf(f,"%d",&p);
FILE*g = fopen("chatnoir.out","w");
while(p--)
{
fscanf(f,"%d%d%d%d",&n,&m,&x,&y);
if(x-1>=3 && n-x>=3 && y-1>=3 && m-y>=3)
fprintf(g,"NU\n");
else
fprintf(g,"DA\n");
}
fclose(f);
fclose(g);
return 0;
}