标签:des style blog http color io os java ar
2 1 2 2 1 1
Yes No
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<string>
#include<queue>
#define eps 1e-9
#define ll long long
#define INF 0x3f3f3f3f
using namespace std;
const int maxn=1000+10;
int a[maxn];
int main()
{
int t,n,cnt,ok;
scanf("%d",&t);
while(t--)
{
cnt=ok=0;
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%d",&a[i]);
for(int i=1;i<=n;i++)
{
if(a[i]==1)
cnt++;
else
{
ok=1;
break;
}
}
if(ok)
{
if(cnt%2)
puts("No");
else
puts("Yes");
}
else
{
if(cnt%2)
puts("Yes");
else
puts("No");
}
}
return 0;
}标签:des style blog http color io os java ar
原文地址:http://blog.csdn.net/u014303647/article/details/39250013