A chess tourney

水题:

2n个人分两队 第一队任意人的分数大于第二队

排序后令n,n+1,不相等即可

C++14迷之WA  换成C++11

AC代码:

 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 int main()
 4 {
 5     int n;
 6     int a[205];
 7     while(cin>>n)
 8     {
 9         for(int i=0;i<n*2;i++)cin>>a[i];
10         sort(a,a+2*n);
11         if(a[n-1]==a[n])cout<<"NO"<<endl;
12         else cout<<"YES"<<endl;
13     }
14 
15     return 0;
16 }
原文地址:https://www.cnblogs.com/sortmin/p/7410589.html