codeforces 845A Chess Tourney

Posted hemeiwolong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了codeforces 845A Chess Tourney相关的知识,希望对你有一定的参考价值。

参考:https://blog.csdn.net/zhongyuchen/article/details/77478039

 1 #include <iostream>
 2 #include <cstdio>
 3 #include <cstring>
 4 #include <algorithm>
 5 using namespace std;
 6 const int N=210;
 7 int n;
 8 int in[N];
 9 int main()
10 {
11     while (cin>>n)
12     {
13         for (int i=0;i<2*n;i++)
14         {
15             cin>>in[i];
16         }
17         sort(in,in+2*n);
18         if (in[n]>in[n-1])
19         {
20             cout<<"YES"<<endl;//注意YES不要写错!
21         }
22         else
23         {
24             cout<<"NO"<<endl;
25         }
26     }
27 
28     return 0;
29 }

 

以上是关于codeforces 845A Chess Tourney的主要内容,如果未能解决你的问题,请参考以下文章

codeforce 985A Chess Placing(暴力)

@codeforces - 793G@ Oleg and chess

CodeForces-38B-Chess枚举+思维

codeforces 7 A. Kalevitch and Chess

Codeforces Round #379 (Div. 2) D. Anton and Chess(模拟)

Codeforces 559C Gerald and Giant Chess