Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int a,b,c,d,x,y,n;
  7.     ifstream cin("11498.in");
  8.     ofstream cout("11498.out");
  9.     //cin>>n;
  10.     //cin>>a>>b;
  11.  
  12.     while(cin>>n>>a>>b)
  13.     for(int i=0; i<n; i++)
  14.     {
  15.         cin>>c>>d;
  16.         x=a-c;
  17.         y=b-d;
  18.  
  19.         if(x<0 && y<0)
  20.             cout<<"NE"<<endl;
  21.         else if(x<0 && y>0)
  22.             cout<<"SE"<<endl;
  23.         else if(x>0 && y>0)
  24.             cout<<"SO"<<endl;
  25.         else if(x>0 && y<0)
  26.             cout<<"NO"<<endl;
  27.         else
  28.             cout<<"divisa"<<endl;
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement