Cod sursa(job #1138296)

Utilizator irimiecIrimie Catalin irimiec Data 9 martie 2014 21:06:04
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.46 kb
#include <fstream>

using namespace std;

ifstream f("chatnoir.in");
ofstream g("chatnoir.out");

void read(), solve(short n, short m, short x, short y);

int main() {
    read();
}

void read() {
    short n,m,x,y;
    long t;
    f>>t;
    for(long i=0;i<t;i++)
        f>>n>>m>>x>>y,solve(n,m,x,y);
}

void solve(short n, short m, short x, short y) {
    if(n-5<x||m-5<y||x<=5||y<=5)
        g<<"DA";
    else
        g<<"NU";
    g<<'\n';
}