恩洛尼亞分部

 avatar
user_3763047219
c_cpp
2 years ago
944 B
2
Indexable
Never
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include<math.h>

int main()
{

	int n = -1, count = 0 ,nlist[1002] = {0};
	static int k1[1002][100] = { 0 };
	static int k2[1002][100] = { 0 };
	while (n != 0) {
		scanf("%d", &n);
		if (n == 0) {
		}
		else {
			nlist[count] = n;
			for (int i = 0; i <= n; i++) {
				scanf("%d %d", &k1[i][count], &k2[i][count]);
			}
			count = count + 1;
		}
	}

	for (int j = 0; j < count; j++) {
		for (int i = 1; i <= nlist[j]; i++) {
			if (k1[i][j] == k1[0][j] || k2[i][j] == k2[0][j]) {
				printf("divisa\n");
			}
			else if (k1[i][j] > k1[0][j] && k2[i][j] > k2[0][j]) {
				printf("NE\n");
			}
			else if (k1[i][j] < k1[0][j] && k2[i][j] > k2[0][j]) {
				printf("NO\n");
			}
			else if (k1[i][j] < k1[0][j] && k2[i][j] < k2[0][j]) {
				printf("SO\n");
			}
			else if (k1[i][j] > k1[0][j] && k2[i][j] < k2[0][j]) {
				printf("SE\n");
			}
		}
	}
}