Pagini recente » Diferente pentru problema/ape intre reviziile 8 si 7 | Cod sursa (job #637777) | Cod sursa (job #638009) | Diferente pentru problema/ape intre reviziile 9 si 8 | Cod sursa (job #1689936)
#include<fstream>
#include<algorithm>
using namespace std;
ifstream fin("chatnoir.in");
ofstream fout("chatnoir.out");
int main() {
int testsCount;
fin >> testsCount;
while (testsCount--) {
int n, m, x, y;
fin >> n >> m >> x >> y;
fout << (min(x, min(y, min(n - x + 1, m - y + 1))) <= 5 ? "DA\n" : "NU\n");
}
return 0;
}
//Trust me, I'm the Doctor!