Submission #679931

#TimeUsernameProblemLanguageResultExecution timeMemory
679931L0RD3NFootball (info1cup20_football)C++14
0 / 100
213 ms2088 KiB
#include "iostream" using namespace std; int t, n, k ; void solve() { int x ; long long sum = 0 ; cin >> n >> k ; for (int i = 1 ; i <= n ; i ++) cin >> x, sum += x ; while (k != 1 && sum % 2 == 0) k /= 2, sum /= 2 ; if (k == 1) cout << 1 << '\n' ; else { cout << sum % 2 << '\n' ; } } int main () { cin >> t ; for (int tt = 1 ; tt <= t ; tt ++) solve() ; return 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...