提交时间:2022-08-03 15:36:59
运行 ID: 56869
#include<bits/stdc++.h> using namespace std; int n,b,c,d; int main(){ while(cin>>n){ c=0,d=0; for(int i=1;i<=n;i++){ cin>>b; if(b%2==0) d++; else c++; } if(d>c) cout<<"NO"; else if(d==c) cout<<"YES"; else cout<<"YES"; } return 0; }