Contest2037 - CSU Monthly 2013 Oct (problem F :ZZY and his little friends)

时间:2023-03-09 05:48:06
Contest2037 - CSU Monthly 2013 Oct (problem F :ZZY and his little friends)

http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2037&pid=5

【题解】:

没想通这题暴力可以过。。。。

【code】:

 #include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std; int arr[]; int main()
{
int n,m;
while(~scanf("%d%d",&n,&m))
{
int i,j;
for(i=;i<n;i++) scanf("%d",arr+i);
for(i=;i<n;i++)
{
for(j=i+;j<n;j++)
{
if((arr[i]^arr[j])>m)
break;
}
if(j<n) break;
}
if(i<n)
{
puts("YES");
}
else
{
puts("NO");
}
}
return ;
}