Problem: 1091 - Division of Nlogonia
Solution:
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t, m,n, x,y, i;
while(cin>>t && t!=0)
{
int a=0, b=0;
cin>>m>>n;
for(i=0; i<t; i++)
{
cin>>a>>b;
//if(a==m && b==n)
if(a>m && b>n)
cout<<"NE"<<endl;
else if(a<m && b>n)
cout<<"NO"<<endl;
else if(a<m && b<n)
cout<<"SO"<<endl;
else if(a>m && b<n)
cout<<"SE"<<endl;
else
cout<<"divisa"<<endl;;
}
}
return 0;
}
Maruf
No comments yet. Be the first to comment!