标签:while highlight logs int 取数游戏 ++ mes scan div
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; int n,a[30*2],sum,sum1,cnt=1; int main(){ scanf("%d",&n); for(int i=1;i<=n;i++){scanf("%d",&a[i]);} while(a[cnt]!=0){sum++; cnt++;} cnt=n; while(a[cnt]!=0){sum1++; cnt--;} if(sum%2==1 || sum1%2==1)puts("YES"); else puts("NO"); return 0; }
标签:while highlight logs int 取数游戏 ++ mes scan div
原文地址:http://www.cnblogs.com/codetogether/p/7635558.html