This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "bits/stdc++.h"
using namespace std;
const long long MX=2e5+10;
long long a[MX];
void fun()
{
long long n,k;
cin>>n>>k;
for(long long i=1;i<=n;i++)
{
cin>>a[i];
}
for(long long x=1,o=0;x<=k;x*=2,o=0)
{
for(long long i=1;i<=n;i++)
{
o^=(a[i]/x)&1;
}
if(o)
{
cout<<"1";
return;
}
}
cout<<"0";
}
int main()
{
cin.tie(0);
ios_base::sync_with_stdio(0);
long long t;
cin>>t;
while(t--)
{
fun();
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |