Pagini recente » Cod sursa (job #1538814) | Rating Vina Andreea (VinaAndreea) | Cod sursa (job #500542) | Diferente pentru problema/monopoly intre reviziile 13 si 42 | 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!