Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <iostream>
  3.  
  4. int main(){
  5.  
  6.     int k;
  7.     scanf("%d", &k);
  8.     while (k != 0){
  9.  
  10.         int d1, d2;
  11.         scanf("%d %d", &d1, &d2);
  12.         for(int i = 0; i<k; i++){
  13.  
  14.             int c1, c2;
  15.             scanf("%d %d", &c1, &c2);
  16.  
  17.             if (c1 == d1 || c2 == d2){
  18.  
  19.                 printf("divisa\n");
  20.             }else if (c1 < d1 && c2 > d2){
  21.                 printf("NO\n");
  22.             }else if (c1 > d1 && c2 > d2){
  23.                 printf("NE\n");
  24.             }else if (c1 < d1 && c2 < d2){
  25.                 printf("SO\n");
  26.             }else if (c1 > d1 && c2 < d2){
  27.                 printf("SE\n");
  28.             }
  29.  
  30.         }
  31.  
  32.         scanf("%d", &k);
  33.     }
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement