Cod sursa(job #2789660)

Utilizator AlexNicuNicu Alexandru AlexNicu Data 27 octombrie 2021 19:39:51
Problema ChatNoir Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.4 kb
#include <fstream>

using namespace std;

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

int main()
{
    int t, n, m, x, y, i;
    cin >> t;
    for ( i = 0; i < t; i++ ) {
        cin >> n >> m >> x >> y;
        if ( x + 4 >= n || y + 4 >= m || x - 4 <= 1 || y - 4 <= 1 )
            cout << "DA\n";
        else
            cout << "NU\n";
    }
    return 0;
}