-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathf.cpp
More file actions
29 lines (25 loc) · 828 Bytes
/
Copy pathf.cpp
File metadata and controls
29 lines (25 loc) · 828 Bytes
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
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <vector>
#define alc(c, x) int *c = (int *)malloc(x * sizeof(int))
#define fr(i, a, v) for (int i = a; i < v; i++)
using namespace std;
int main () {
int cases, x, y, tempx, tempy;
while (1) {
scanf("%d", &cases);
if (cases == 0) break;
scanf("%d %d", &x, &y);
fr(i, 0, cases){
scanf("%d %d", &tempx, &tempy);
if (tempx == x || tempy == y) printf("divisa\n");
if (tempx > x && tempy > y) printf("NE\n");
else if (tempx > x && tempy < y) printf("SE\n");
else if (tempx < x && tempy < y) printf("SO\n");
else if (tempx < x && tempy > y) printf("NO\n");
else if (tempx > x && tempy > y) printf("NE\n");
}
}
return 0;
}