fork download
  1. #include <bits/stdc++.h>
  2. #define ll long long
  3. #define YES cout << "YES\n";
  4. #define NO cout << "NO\n";
  5. #define divisa cout << "divisa\n";
  6. #define NE cout << "NE\n";
  7. #define SO cout << "SO\n";
  8. #define SE cout << "SE\n";
  9. #define opps cout<<-1<<endl;
  10. const ll con = 1e9;
  11. using namespace std;
  12. void solve(int n , int m , int x , int y) {
  13. if ( x == n || y == m ) {
  14. divisa
  15. return;
  16. }
  17. if (x >n && y >m) {
  18. NE;
  19. return;
  20. }
  21. if (x <n && y <m) {
  22. SO;
  23. return;
  24. }
  25. if (x >n && y <m) {
  26. SE;
  27. return;
  28. }
  29. NO;
  30. }
  31. int main() {
  32. ios::sync_with_stdio(0);
  33. cin.tie(0);
  34. int k ;
  35. while (cin >> k && k != 0) {
  36. int n , m ;
  37. cin >> n >> m ;
  38. int x , y;
  39. for (int i = 0 ; i < k ; i++) {
  40. cin >> x >>y;
  41. solve(n,m,x,y);
  42. }
  43. }
  44. }
Success #stdin #stdout 0s 5312KB
stdin
Standard input is empty
stdout
Standard output is empty