Cod sursa(job #635349)

Utilizator ctlin04UAIC.VlasCatalin ctlin04 Data 19 noiembrie 2011 10:41:36
Problema ChatNoir Scor 0
Compilator fpc Status done
Runda .com 2011 Marime 0.51 kb
Program chatnoir;
 var m,n,x,y,i,t:longint;
     b1,b2:array [1..1 shl 15] of  char;
     fi,fo:text;
begin
 assign(fi,'chatnoir.in');
  assign(fo,'chatnoir.out');
 settextbuf(fi,b1);
  settextbuf(fo,b2);
 reset(fi); rewrite(fo);
 readln(fi,t);
 for i:=1 to t do begin
                  readln(fi,n,m,x,y);
                  if ((n-x<=5) and (m-y<=5)) or ((x<=5) and (y<=5)) then writeln(fo,'DA')
                                              else writeln(fo,'NU');
                  end;
 close(fo);
end.