标签:des style http color io os ar java for
乱搞:
rt,有1就能输出所有的数,否则只能输出偶数

2 4 2 2 2 1 0 1 2 3
NO YES YES YES
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int n,m;
int t[100100],c[100100];
int main()
{
while(scanf("%d%d",&n,&m)!=EOF)
{
bool flag=false;
for(int i=1;i<=n;i++)
scanf("%d",t+i);
for(int i=1;i<=n;i++)
{
scanf("%d",c+i);
if(c[i]==1) flag=true;
}
for(int i=0;i<m;i++)
{
int x;
scanf("%d",&x);
if(x<=0) puts("NO");
else
{
if(flag) puts("YES");
else
{
if(x%2==0) puts("YES");
else puts("NO");
}
}
}
}
return 0;
}
标签:des style http color io os ar java for
原文地址:http://blog.csdn.net/ck_boss/article/details/40431827