Codeforces Round #450 (Div. 2)A
来源:互联网 发布:mac sass 中文版 编辑:程序博客网 时间:2024/05/29 12:17
Problem A. Find Extra One
链接:http://codeforces.com/contest/900/problem/A
题意:给出平面内的n个点, 问是否可以移动其中一个点使其都在Y轴一侧。
题解:直接判断左右两边的点数,确定是否可以。
#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ std::ios::sync_with_stdio(false), cin.tie(0); int n; cin >> n; int l,r; l=r=0; while(n --) { int a, b; cin >> a >> b; if(a < 0) l ++; else r ++; } if(l == 0 || r == 0 || l == 1 || r == 1) { cout << "YES\n"; } else { cout << "NO\n"; } return 0;}
Problem
阅读全文
0 0
- Codeforces Round #450 (Div. 2)A
- Codeforces Round #450 (Div. 2) A题 + B题
- Codeforces Round #450 (Div. 2) A-C题解
- Codeforces Round #131 (Div. 2) A B
- Codeforces Round #174 (Div. 2) Problem A
- Codeforces Round #173 (Div. 2) A.Bit++
- Codeforces Round #181 (Div. 2) A题
- Codeforces Round #184 (Div. 2) A题
- Codeforces Round #185 (Div. 2)--A,B
- Codeforces Round #172 (Div. 2) A题
- Codeforces Round #166 (Div. 2) A题
- Codeforces Round #132 (Div. 2) A题
- Codeforces Round #131 (Div. 2) A题
- Codeforces Round #133 (Div. 2) A题
- Codeforces Round #137 (Div. 2) A题
- Codeforces Round #138 (Div. 2) A题
- Codeforces Round #147 (Div. 2) A题
- Codeforces Round #141 (Div. 2) A题
- 程序员面试总结
- Storm的并行度详解 Strom Topology执行分析:worker数,Bolt实例数,executor数,task数
- STL源码分析-heap部分
- Node.js Setup:This may indicate a problem with this package. The error code is 2503.
- Android开发学习之路--APT技术
- Codeforces Round #450 (Div. 2)A
- jquery插件select2的所有事件,包括清除,删除,打开等
- 关于matlab需要重新激活问题的解决方法
- Hdoj 1000 A + B Problem
- JS学习:了解事件冒泡和事件捕获
- Win10系统下怎么让局域网内其他电脑通过IP访问网站
- SDL2.0在mfc窗口中显示yuv的一种方法
- 一个复杂系统的拆分改造实践
- 库文件解释