Pagini recente » Cod sursa (job #2900931) | Cod sursa (job #1239224) | Cod sursa (job #534288) | Cod sursa (job #880051) | Cod sursa (job #2777895)
#include <stdio.h>
int main() {
FILE *fin, *fout;
int t, n, m, x, y;
fin = fopen( "chatnoir.in", "r" );
fout = fopen( "chatnoir.out", "w" );
fscanf( fin, "%d", &t );
while ( t-- ) {
fscanf( fin, "%d%d%d%d", &n, &m, &x, &y );
if ( x + 4 >= n || y + 4 >= m || x - 4 <= 1 || y - 4 <= 1 )
fprintf( fout, "DA\n" );
else
fprintf( fout, "NU\n" );
}
fclose( fin );
fclose( fout );
return 0;
}