Cod sursa(job #2777245)

Utilizator YusyBossFares Yusuf YusyBoss Data 22 septembrie 2021 17:36:03
Problema ChatNoir Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.34 kb
#include <fstream>

using namespace std;

ifstream cin ("chatnoir.in");
ofstream cout ("chatnoir.out");

int main() {
  int t, n, m, x, y;
  cin >> t;

  while (t--) {
    cin >> n >> m >> x >> y;

    if (x + 4 >= n || y + 4 >= m || x - 4 <= 1 || y - 4 <= 1)
      cout << "DA\n";
    else
      cout << "NU\n";
  }
  return 0;
}