Submission #944471

#TimeUsernameProblemLanguageResultExecution timeMemory
944471Captain_GeorgiaFootball (info1cup20_football)C++17
100 / 100
211 ms2268 KiB
#include <bits/stdc++.h> using namespace std; #define file \ freopen("in.txt" , "r" , stdin); \ freopen("out.txt" , "w" , stdout); typedef long long ll; void test_case () { int n , k; cin >> n >> k; ll sum = 0; int a[n]; for (int i = 0;i < n;i ++) { cin >> a[i]; } for (int x = 1;x <= k;x *= 2) { sum = 0; for (int i = 0;i < n;i ++) { sum += (a[i] / x); } if (sum %2 != 0) { cout << "1"; return; } } cout << "0"; } int32_t main () { // file int TIME = clock(); int t = 1; cin >> t; while (t --) { test_case(); } cerr << "\nTime elapsed: " << (clock() - TIME) * 1000.0 / CLOCKS_PER_SEC << " ms\n"; }
#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...