-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path11498.cpp
64 lines (60 loc) · 760 Bytes
/
11498.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
11498 - Division of Nlogonia
*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
int test,i,n,m,x,y;
while(scanf("%d",&test)==1 && test){
scanf("%d %d",&n,&m);
while(test--)
{
scanf("%d %d",&x,&y);
if( x==n || m==y)
{
puts("divisa");
}
if( x > n && y > m )
{
puts("NE");
}
if(x>n && y<m)
{
puts("SE");
}
if(x<n && y<m)
{
puts("SO\n");
}
if(x<n && y>m)
{
puts("NO");
}
}
}
return 0;
}
/*
Sample Input
3
2 1
10 10
-10 1
0 33
4
-1000 -1000
-1000 -1000
0 0
-2000 -10000
-999 -1001
0
Sample Output
NE
divisa
NO
divisa
NE
SO
SE
*/