Pagini recente » Cod sursa (job #3361485) | Cod sursa (job #3363125) | Cod sursa (job #3361579) | Cod sursa (job #3361479) | Cod sursa (job #3363123)
#include <fstream>
using namespace std;
ifstream in("chatnoir.in");
ofstream out("chatnoir.out");
int check(int n, int m, int xx, int yy){
if((xx - 1 <= 4 || n - xx <= 4) || (yy - 1 <= 4 || m - yy <= 4)){
return 1;
}
return 0;
}
int main(){
int tests; in>>tests;
for(; tests > 0; tests--){
int n, m, xx, yy;
in>>n>>m>>xx>>yy;
out<<(check(n, m, xx, yy) ? "DA\n" : "NU\n");
}
return 0;
}