Pagini recente » Cod sursa (job #212454) | Cod sursa (job #3237899) | Cod sursa (job #600119) | Cod sursa (job #1982529) | Cod sursa (job #1313597)
#include <stdio.h>
int main(){
FILE *in = fopen("chatnoir.in", "r");
FILE *out = fopen("chatnoir.out", "w");
int t, n, m, x, y, i;
fscanf(in, "%d", &t);
for(i = 0; i < t; i++){
fscanf(in, "%d%d%d%d", &n, &m, &x, &y);
if(n - x < 4 || x - 1 < 4 || m - y < 4 || y - 1 < 4)
fprintf(out, "DA\n");
else
fprintf(out, "NU\n");
}
fclose(in);
fclose(out);
return 0;
}