Cod sursa(job #846236)

Utilizator stoicatheoFlirk Navok stoicatheo Data 1 ianuarie 2013 19:03:36
Problema ChatNoir Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.34 kb
#include <fstream>
using namespace std;
int main()
{
    ifstream f("chatnoir.in");
    ofstream g("chatnoir.out");
    int X,Y,N,M,T,i;
    f>>T;
    for(i=1;i<=T;i++)
    {   f>>N; f>>M; f>>X; f>>Y;
        if(X<=5||N-X<=4||Y<=5||M-Y<=4) g<<"DA"<<"\n";
        else g<<"NU"<<"\n";
    }
    f.close();
    g.close();
    return 0;
}