Cod sursa(job #2802463)

Utilizator petrescu_bogdanBogdan Petrescu petrescu_bogdan Data 18 noiembrie 2021 11:00:29
Problema ChatNoir Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.35 kb
#include <fstream>

using namespace std;

int main() {
  ifstream fin("chatnoir.in");
  ofstream fout("chatnoir.out");
  int t,n,m,l,c,ok;
  fin>>t;
  for(int i=0;i<t;i++) {
    fin>>n>>m>>l>>c;
      if(l-4<=1 || c-4<=1 || l+5>n || c+5>m) {
        fout<<"DA"<<"\n";
      }
      else {
        fout<<"NU"<<"\n";
      }
  }
  return 0;
}