Cod sursa(job #1356839)

Utilizator iulianrotaruRotaru Gheorghe-Iulian iulianrotaru Data 23 februarie 2015 16:57:26
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.32 kb
#include <fstream>
using namespace std;
ifstream f("chatnoir.in"); ofstream g("chatnoir.out");
int main()
{   int n,m,x,y,t;
    f>>t;
    while(t--)
    {   f>>n>>m>>x>>y;
        int ok=0;
        if(n-x<=4||m-y<=4||x<=5||y<=5) ok=1;
        if(ok) g<<"DA\n"; else g<<"NU\n";
    }
    g.close(); return 0;
}