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;
long long a,b,c,d,e,i,j,ii,jj,zx,xc,tes,t,f[100009],k,fx[100009];
int main(){
ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
cin>>tes;
for(t=1; t<=tes; t++){
cin>>a>>k;
for(i=1; i<=a; i++) cin>>f[i];
for(j=0; j<=35; j++) fx[j]=0;
zx=1;
int bo=0;
for(j=0; j<=33; j++){
if(zx>k) break;
for(i=1; i<=a; i++){
fx[j]+=f[i]/zx;
}
if(fx[j]%2==1){
bo=1;
break;
}
zx*=2;
}
cout<<bo;
}
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... |