Submission #675172

#TimeUsernameProblemLanguageResultExecution timeMemory
675172TranGiaHuy1508Football (info1cup20_football)C++17
0 / 100
29 ms404 KiB
#include <bits/stdc++.h> using namespace std; void main_program(); signed main(){ ios_base::sync_with_stdio(0); cin.tie(0); int T; cin >> T; while (T--) main_program(); cout << "\n"; } int n, k; vector<int> v; int solve(vector<int> &a){ bool all0 = true; int parity = 0; for (auto i: a){ all0 &= (!i); parity ^= i; } if (all0) return 0; if (parity & 1) return 1; else{ for (auto &i: a) i >>= 1; return solve(a); } } void main_program(){ cin >> n >> k; v.resize(n); for (auto &i: v) cin >> i; cout << solve(v); }
#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...