Submission #524380

#TimeUsernameProblemLanguageResultExecution timeMemory
524380mateigg4Football (info1cup20_football)C++14
100 / 100
213 ms2012 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...