Submission #365533

#TimeUsernameProblemLanguageResultExecution timeMemory
365533jasen_penchevFootball (info1cup20_football)C++14
50 / 100
35 ms2156 KiB
#include <iostream> #define endl '\n' using namespace std; int main() { ios :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int T; cin >> T; while (T--) { int N, K; cin >> N >> K; long long S = 0; for (int i = 1; i <= N; ++ i) { int a; cin >> a; S += a; } while (S % 2 == 0 and K != 1) { S /= 2; K /= 2; } if (S % 2 == 1) cout << 1; else cout << 0; } cout << endl; 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...