Submission #316907

#TimeUsernameProblemLanguageResultExecution timeMemory
316907jungsnowFootball (info1cup20_football)C++14
100 / 100
43 ms2044 KiB
#include<bits/stdc++.h> using namespace std; using ll = long long; const int N = 100100; int n, k; int a[N]; void solve() { cin >> n >> k; for (int i = 1; i <= n; ++i) { cin >> a[i]; } bool ans = 0; for (int j = 0; (1 << j) <= k; ++j) { ll sum = 0; for (int i = 1; i <= n; ++i) { sum += (a[i] / (1 << j)); } if (sum & 1) { ans = 1; break; } } cout<<ans; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while (t--) solve(); }
#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...