Submission #674468

#TimeUsernameProblemLanguageResultExecution timeMemory
674468QwertyPiFootball (info1cup20_football)C++14
100 / 100
41 ms2140 KiB
#include <bits/stdc++.h> #define all(x) x.begin(), x.end() #define fi first #define se second #define int long long using namespace std; int a[100001]; void solve(){ int n, k; cin >> n >> k; for(int i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); for(int j = 1; j <= k; j *= 2){ int tot = 0; for(int i = 0; i < n; i++){ tot += a[i] / j % 2; } if(tot % 2 == 1){ cout << 1; return; } } cout << 0; } int32_t main(){ cin.tie(0); cout.tie(0)->sync_with_stdio(false); 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...