Advertisement
RIFAT007

UVa 11498

Jan 24th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstdio>
  3. using namespace std;
  4. int main(void)
  5. {
  6.     int t,x,y,n,m;
  7.     while(1)
  8.     {
  9.         scanf("%d",&t);
  10.         if(t==0)
  11.         {
  12.             break;
  13.         }
  14.         scanf("%d%d",&x,&y);
  15.         for(int i=0; i<t; i++)
  16.         {
  17.             scanf("%d%d",&n,&m);
  18.             if(x==n || y==m)
  19.             {
  20.                 printf("divisa\n");
  21.             }
  22.             else if(x<n && y<m)
  23.             {
  24.                 printf("NE\n");
  25.             }
  26.             else if(x>n && y<m)
  27.             {
  28.                 printf("NO\n");
  29.             }
  30.             else if(x>n && y>m)
  31.             {
  32.                 printf("SO\n");
  33.             }
  34.             else if(x<n && y>m)
  35.             {
  36.                 printf("SE\n");
  37.             }
  38.         }
  39.     }
  40.     return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement