#include<stdio.h>int main(){ int n; int inputx[200000]; int inputy[200000]; while (scanf("%d", &n), n) { int i; for (i = 0; i < n; i++) scanf("%d %d", &inputx[i], &inputy[i]); int x = inputx[n / 2], y = inputy[n / 2]; int s = 0, o = 0; int xx, yy; for (i = 0; i < n; i++) { xx = inputx[i], yy = inputy[i]; if ((xx > x && yy > y) || (xx < x && yy < y)) s++; if ((xx < x && yy > y) || (xx > x && yy < y)) o++; } printf("%d %dn", s, o); } return 0;}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)