Cod sursa(job #2777243)
Utilizator | Data | 22 septembrie 2021 17:30:56 | |
---|---|---|---|
Problema | ChatNoir | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <fstream>
using namespace std;
int main() {
ifstream cin("chatnoir.in");
ofstream cout("chatnoir.out");
int t, n, m, a, b, mn;
cin>>t;
while( t-- ) {
cin>>n>>m>>a>>b;
mn = 2100000000;
mn = min( a, mn );
mn = min( n - a, mn);
mn = min( b, mn );
mn = min( m - b, mn );
if( mn <= 5 )
cout<<"DA";
else
cout<<"NU";
cout<<"\n";
}
return 0;
}