Submission #406985

#TimeUsernameProblemLanguageResultExecution timeMemory
406985PetyFootball (info1cup20_football)C++14
50 / 100
38 ms1260 KiB
#include <bits/stdc++.h> #define ll long long #define ld long double using namespace std; const ll MOD = 1e9 + 7; const ll INF = 1e9; ll t, n, k, x; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> t; while (t--) { cin >> n >> k; ll x = 0, a; while (n--) { cin >> a; x += a; } while (x % 2 == 0 && k > 1) { x /= 2; k /= 2; } if (x % 2 == 1) { cout << 1; } else { cout << 0; } } 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...