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;
typedef long long ll;
#define int ll
int t;
int arr[100005];
signed main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
cin >> t;
for(int e=1;e<=t;e++){
int n,k;
cin >> n >> k;
for(int i=1;i<=n;i++){
cin >> arr[i];
}
bool yes = false;
for(int j=0;j<=20;j++){
if((1LL<<j)>k){
break;
}
int tot=0;
for(int i=1;i<=n;i++){
tot += arr[i]/(1LL<<j);
}
if(tot%2LL){
yes = true;
break;
}
}
if(yes){
cout << 1;
}
else{
cout << 0;
}
}
cout << "\n";
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... |