简单枚举
比较奇偶数个数
http://www.nowcoder.com/questionTerminal/6ba928cea3734205b042b9445de9aecb
#include <stdio.h> int main(){ int n,i,odd,even; while(scanf("%d",&n)!=EOF){ int a[n]; for(i=0,odd=0,even=0;i<n;i++) { scanf("%d ",&a[i]); if(a[i]%2!=0) odd++; else even++; } if(even>odd) printf("NO\n"); else printf("YES\n"); } }(•̀ᴗ•́)و