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 <iostream>
using std::cin;
using std::cout;
static void testcase() {
int n,k,xsum=0;
cin >> n >> k;
for(int i=0,x; i<n; i++)
cin >> x,xsum^=x;
for(int i=1; i<=k; i<<=1) {
if(i&xsum) {
cout << "1";
return;
}
}
cout << "0";
}
int main() {
int t;
cin >> t;
while(t--)
testcase();
cout <<'\n';
}
# | 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... |