Advertisement
otot957

Untitled

Aug 5th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.97 KB | None | 0 0
  1. #include <iostream>
  2. #include<array>
  3. #include <bits/stdc++.h>
  4. using namespace std;
  5. int main ()
  6.  
  7.  
  8.  
  9. {
  10.     int n,x,y,px,py;
  11.     cin>>n;
  12.     while (n!=0){
  13.             cin>>x>>y;
  14.         for (int i=0;i<n;i++){
  15.             cin>>px>>py;
  16.             if(px<x){
  17.                 if(py<y){
  18.                     cout<<"SO"<<endl;
  19.                 }
  20.                 else if(py>y){
  21.                     cout<<"NO"<<endl;
  22.                 }
  23.                 else if(py==y){
  24.                     cout<<"divisa"<<endl;
  25.                 }
  26.             }
  27.            else if(px>x){
  28.                     if(py<y){
  29.                     cout<<"SE"<<endl;
  30.                 }
  31.                 else if(py>y){
  32.                     cout<<"NE"<<endl;
  33.                 }
  34.                 else if(py==y){
  35.                     cout<<"divisa"<<endl;
  36.                 }
  37.             }
  38.             else if(px==x)
  39.                 cout<<"divisa"<<endl;
  40.  
  41.         }
  42.         cin>>n;
  43.     }
  44.  
  45.  
  46.     return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement