Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
56753 | 王籽易 | 比较奇偶数个数 | C++ | Accepted | 100 | 0 MS | 256 KB | 264 | 2022-08-03 14:27:49 |
#include <bits/stdc++.h> using namespace std; int n; int main(){ while(cin>>n){ int k=0,j=0; for(int i=1;i<=n;i++){ int t; cin>>t; if(t%2==0) k++; else j++; } if(k>j) cout<<"NO"<<endl; else cout<<"YES"<<endl; } return 0; }