ZOJ-2554
来源:互联网 发布:.net编程语言 编辑:程序博客网 时间:2024/06/07 11:51
#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 %d\n", s, o); } return 0;}
0 0
- zoj 2554
- ZOJ-2554
- zoj 2554 Brownie Points
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- Python Collection 小技巧
- 关于Dos命令的使用简介
- 嵌入式 linux编程中自定义LOG宏示例
- 危险代码:内存中的Java类和对象为何变得不安全—Part4
- 在线算法学习
- ZOJ-2554
- 关于Datasource与数据库连接池的区别。
- 黑马程序员------- 抽象类和接口-------
- XCode 同一Project创建多个target
- 剑指OFFER之队列
- 用Python和Pygame写游戏-从入门到精通(3)
- 【单步调试】 VC
- 梦想从这里开始,退一步海阔天空
- 文本框的长度限制,和类别