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>
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie();
#define ll long long
using namespace std;
int A[100005];
void go(){
int n,k; cin>>n>>k;
int res=0;
for(int i=0;i<n;i++){
cin>>A[i];
int a=0;
while(A[0]%2==0){
A[0]/=2;
a*=2;
}
if(k>=a) res^=1;
}
cout<<res;
}
int main(){
fastio;
int t; cin>>t;
while(t--){
go();
}
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... |