Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
56755 | 姜李烨 | 比较奇偶数个数 | C++ | Wrong Answer | 0 | 0 MS | 248 KB | 247 | 2022-08-03 14:28:27 |
#include<bits/stdc++.h> using namespace std; int n,a[1005],j=0,o=0; int main(){ while(cin>>n){ for(int i=1;i<=n;i++){ cin>>a[i]; if(a[i]%2==0) o++; else j++; } if(o>j) cout<<"NO"; else cout<<"YES"; } return 0; }