提交时间:2022-08-03 14:41:17
运行 ID: 56788
#include<bits/stdc++.h> using namespace std; int a,b[1010],c,d; int main(){ while(cin>>a){ for(int i=1;i<=a;i++){ cin>>b[i]; } for(int i=1;i<=a;i++){ if(b[i]!=0){ if(b[i]%2==0) c++; if(b[i]%2==1) d++; } } if(c>d) cout<<"NO"<<endl; else cout<<"YES"<<endl; } return 0; }