Pagini recente » Cod sursa (job #517009) | Cod sursa (job #2629841) | Cod sursa (job #1768578) | Diferente pentru algoritmul-lee intre reviziile 41 si 14 | Cod sursa (job #1528794)
#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;
}
//Miriam e tare!