codeforces 845A Chess Tourney
来源:互联网 发布:粒子群算法应用于实际 编辑:程序博客网 时间:2024/04/30 06:05
题意:把2n个数,等分成两组,能不能一组的任意个比另一组的任意一个数都大。
题解: 排序,然后比较a[n] 和 a[n-1]即可
#include <iostream>#include <algorithm>using namespace std;#define N 102int a[2 * N];int main(){int n;cin >> n;for(int i = 0;i < 2*n; ++i)cin >> a[i];sort(a,a+2*n);if(a[n - 1] < a[n])cout << "YES";else cout << "NO";}
非常水的一题
阅读全文
0 0
- codeforces 845A Chess Tourney
- Codeforces 845 A Chess Tourney
- codeforces 845A Chess Tourney
- Codeforces 845A Chess Tourney
- Codeforces 845 A. Chess Tourney 思路:简单逻辑题
- A. Chess Tourney【Educational Codeforces Round 27】
- cfA.Chess Tourney
- codeforces 7A - Kalevitch and Chess
- Codeforces 7A Kalevitch and Chess
- CodeForces 7A Kalevitch and Chess
- CodeForces 7A Kalevitch and Chess
- CodeForces 7A Kalevitch and Chess
- codeforces 7 A. Kalevitch and Chess
- CodeForces 7A - Kalevitch and Chess
- CodeForces 7A Kalevitch and Chess
- Codeforces 7A Kalevitch and Chess
- Codeforces 664A Gerald and Giant Chess
- CodeForces 893A Chess For Three
- 拓扑排序
- Eclipse mac 环境工程被锁
- The request sent by the client was syntactically incorrect.
- server socket
- vs怎么用断点调试?
- codeforces 845A Chess Tourney
- 实习日志1
- 泛型 (上)
- ssm框架系列(4)-MyBatis入门
- Pygame、Python五子棋游戏
- winform 中lable的过长导致被截取造成难看的界面解决方法
- 关于SSH
- FTP文件上传
- popupwindow点击问题