Cod sursa(job #1077858)

Utilizator andreiiiiPopa Andrei andreiiii Data 11 ianuarie 2014 18:44:28
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include <algorithm>
#include <fstream>

using namespace std;

ifstream fin("chatnoir.in");
ofstream fout("chatnoir.out");

int main()
{
    int t, n, m, x, y;
    fin>>t;
    while(t--)
    {
        fin>>n>>m>>x>>y;
        if(min(min(x-1, y-1), min(n-x, m-y))<=4) fout<<"DA\n";
        else fout<<"NU\n";
    }
    fin.close();
    fout.close();
}