fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define el "\n"
  4. #define ll long long
  5. #define ull unsigned long long
  6. #define se second
  7. #define fi first
  8. #define be begin()
  9. #define en end()
  10. #define Faster cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
  11.  
  12. int main()
  13. {
  14. Faster;
  15. int n, w, h;
  16. cin >> n >> w >> h;
  17. if(w > h) swap(w, h);
  18. int test = sqrt(w*w + h*h);
  19. while(n--)
  20. {
  21. int x; cin >> x;
  22. if(x <= test) cout << "DA";
  23. else cout << "NE";
  24. cout << el;
  25. }
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0s 5288KB
stdin
5 3 4
3
4
5
6
7
stdout
DA
DA
DA
NE
NE