Cod sursa(job #636001)

Utilizator cmiNCosmin Poieana cmiN Data 19 noiembrie 2011 16:15:09
Problema ChatNoir Scor 0
Compilator cpp Status done
Runda .com 2011 Marime 0.39 kb
#include <iostream>
#include <fstream>
using namespace std;


int main()
{
    int n, m, x, y, t;
    ifstream fin("chatnoir.in");
    ofstream fout("chatnoir.out");
    fin >> t;
    while (t--) {
        fin >> n >> m >> x >> y;
        if (x == 1 || x == n || y == 1 || y == m) fout << "DA";
        else fout << "NU";
        fout << endl;
    }
    fin.close();
    fout.close();
    return 0;
}