Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
56754 | 张弛 | 比较奇偶数个数 | C++ | Accepted | 100 | 0 MS | 244 KB | 241 | 2022-08-03 14:28:04 |
#include<bits/stdc++.h> using namespace std; int n,a,j,o; int main(){ while(cin>>n){ for(int i=1;i<=n;i++){ cin>>a; if(a%2==0) o++; else j++; } if(o>j) cout<<"NO"<<endl; else cout<<"YES"<<endl; } return 0; }