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;
signed main()
{
int t, n, i, m, xorr, k, ok, j;
cin >> t;
while (t--)
{
cin >> n >> k;
xorr = 0, j = 0;
while (k >= (1 << j))
j++;
j--;
for (i = 1; i <= n; i++)
{
cin >> m;
xorr ^= m;
}
ok = 0;
for (i = 0; i <= j; i++)
{
if ((xorr & (1 << i)))
{
cout << 1;
ok = 1;
break;
}
}
if (ok == 0)
cout << 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... |