Advertisement
kcku

11498 - Division of Nlogonia

Nov 6th, 2015
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <cstdio>
  2.  
  3. int main() {
  4.     for(int k; scanf("%d", &k) && k;) {
  5.         int x, y;
  6.         scanf("%d%d", &x, &y);
  7.         for(int a, b; k-- && scanf("%d%d", &a, &b);) {
  8.             if(a == x || b == y) puts("divisa");
  9.             else if(a > x && b > y) puts("NE");
  10.             else if(a > x && b < y) puts("SE");
  11.             else if(a < x && b > y) puts("NO");
  12.             else puts("SO");
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement