Submission #525179

#TimeUsernameProblemLanguageResultExecution timeMemory
525179maks007Football (info1cup20_football)C++14
100 / 100
215 ms1404 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main(void) { int t; cin >> t; int countdown = 0; while(t --){ int n, k; cin >> n >> k; vector <int> a(n); function <int()> check=[&]() { int cnt = 0; for(int i = 0; i < n; i++) { if(a[i] == 1 or a[i] == 0) cnt ++; } if(cnt == n) return 0; else return 1; }; for(int i = 0; i < n; i ++) cin >> a[i]; while(k > 0) { int sum = accumulate(a.begin(), a.end(), 0ll); for(int i = 0; i < n; i ++) a[i] >>= 1; if(sum % 2 == 1) { cout << 1; goto end; } k /= 2; } cout << 0; end:; } return false; }

Compilation message (stderr)

football.cpp: In function 'int32_t main()':
football.cpp:8:6: warning: unused variable 'countdown' [-Wunused-variable]
    8 |  int countdown = 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...