Submission #675179

#TimeUsernameProblemLanguageResultExecution timeMemory
675179hollwo_pelwFootball (info1cup20_football)C++17
100 / 100
37 ms416 KiB
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/trie_policy.hpp> // #include <ext/rope> using namespace std; // using namespace __gnu_cxx; // using namespace __gnu_pbds; void Hollwo_Pelw(); signed main(){ #ifndef hollwo_pelw_local if (fopen(".inp", "r")) assert(freopen(".inp", "r", stdin)), assert(freopen(".out", "w", stdout)); #else using namespace chrono; auto start = steady_clock::now(); #endif cin.tie(0), cout.tie(0) -> sync_with_stdio(0); int testcases = 1; cin >> testcases; for (int test = 1; test <= testcases; test++){ // cout << "Case #" << test << ": "; Hollwo_Pelw(); } #ifdef hollwo_pelw_local auto end = steady_clock::now(); cout << "\nExecution time : " << duration_cast<milliseconds> (end - start).count() << "[ms]" << endl; #endif } const int N = 1e5 + 5; int n, k, a[N]; void Hollwo_Pelw(){ cin >> n >> k; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (int i = 0; 1 << i <= k; i++) { long long f = 0; for (int j = 1; j <= n; j++) { f += a[j] >> i; } if (f & 1) { cout << "1"; return; } } 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...