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 namespace std;
void solve () {
int n, k, res = 0, x;
cin >> n >> k;
for ( int i = 1; i <= n; i++ ) {
cin >> x;
res ^= x;
}
for ( int p = 1; p <= k; p <<= 1 )
if ( res & p ) {
cout << 1;
return;
}
cout << 0;
}
int main() {
int t;
cin >> t;
while ( t-- )
solve ();
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... |