Submission #679930

#TimeUsernameProblemLanguageResultExecution timeMemory
679930L0RD3NFootball (info1cup20_football)C++14
0 / 100
1 ms212 KiB
#include "fstream" using namespace std; ifstream cin ("in.in") ; ofstream cout ("out.out") ; 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...