forked from gmendonca/uri-problem-solutions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1091.cpp
More file actions
23 lines (18 loc) · 621 Bytes
/
1091.cpp
File metadata and controls
23 lines (18 loc) · 621 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
int main(){
int k, n, m, x, y, i;
while(1){
scanf("%d", &k);
if(k == 0) break;
scanf("%d %d", &n, &m);
for(i = 0; i < k; i++){
scanf("%d %d", &x, &y);
if(x == n || y == m) printf("divisa\n");
else if(x > n && y > m) printf("NE\n");
else if(x > n && y < m) printf("SE\n");
else if(x < n && y > m) printf("NO\n");
else if(x < n && y < m) printf("SO\n");
}
}
return 0;
}