Cod sursa(job #3363091)
| Utilizator | Data | 14 august 2026 09:25:06 | |
|---|---|---|---|
| Problema | ChatNoir | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.48 kb |
#include <bits/stdc++.h>
using namespace std;
int main()
{
ifstream cin("chatnoir.in");
ofstream cout("chatnoir.out");
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int i, n, m, x, y, t;
cin >> t;
for(i = 0; i < t; i++)
{
cin >> n >> m >> x >> y;
if(min(min(n - x, m - y), min(x - 1, y - 1)) <= 4)
{
cout << "DA\n";
}
else
{
cout << "NU\n";
}
}
return 0;
}