Cod sursa(job #678833)
Utilizator | Data | 12 februarie 2012 14:17:51 | |
---|---|---|---|
Problema | ChatNoir | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 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>5 && n-x>4 && y>5 && m-y>4)
fprintf(g,"NU\n");
else
fprintf(g,"DA\n");
}
fclose(f);
fclose(g);
return 0;
}