제출 #365535

#제출 시각아이디문제언어결과실행 시간메모리
365535jasen_penchevFootball (info1cup20_football)C++14
100 / 100
37 ms1516 KiB
#include <iostream> #define endl '\n' using namespace std; const int MAXN = 100000; int a[MAXN + 5]; 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) { cin >> a[i]; S += a[i]; } while (S % 2 == 0 and K != 1) { K /= 2; S = 0; for (int i = 1; i <= N; ++ i) { a[i] /= 2; S += a[i]; } } 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...