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;
int k,n,t,ak;
long long b;
bool result;
vector<int>classes;
int main(){
cin>>t;
for(int p=0;p<t;p++){
result=0;
cin>>n>>k;
classes.clear();
for(int i=0;i<n;i++){
cin>>ak;
classes.push_back(ak);
}
for(int a=1;a<=k;a*=2){
b=0;
for(int i=0;i<n;i++){
b+=classes[i]/a;
}
if(b%2==1)
result=1;
}
cout<<result;
}
}
# | 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... |