Cod sursa(job #1745271)

Utilizator fanache99Constantin-Buliga Stefan fanache99 Data 21 august 2016 16:17:02
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.42 kb
#include <fstream>

using namespace std;

ifstream cin("chatnoir.in");
ofstream cout("chatnoir.out");

int main() {
    int tests;
    cin >> tests;
    for (int test = 1; test <= tests; test++) {
        int n, m, x, y;
        cin >> n >> m >> x >> y;
        if (min(min(x, n - x + 1), min(y, m - y + 1)) <= 5)
            cout << "DA\n";
        else
            cout << "NU\n";
    }
    return 0;
}