#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <string>
#include <string.h>
#include <vector>
#include <queue>
#include <stack>
#include <sstream>
using namespace std;
//1169
int main(){
int a,b,n,t;
//freopen("input.txt","r",stdin);
while(cin>>n){
a=b=0;
while(n--){
cin>>t;
if(t%2==0) a++;
else b++;
}
if(a>b) printf("NO\n");
else printf("YES\n");
}
return 0;
}
/**************************************************************
Problem: 1169
User: cust123
Language: C++
Result: Accepted
Time:10 ms
Memory:1520 kb
****************************************************************/
题目1169:比较奇偶数个数
最新推荐文章于 2018-12-09 20:05:46 发布