Submission #845336

#TimeUsernameProblemLanguageResultExecution timeMemory
845336samekkkFootball (info1cup20_football)C++14
26 / 100
21 ms600 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define rep(a,b) for (int a = 0; a < (b); ++a) #define pb push_back #define all(t) t.begin(), t.end() const int max_N = 1e5+5; int t = 0, n = 0, k = 0; ll sum = 0; int A[max_N]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> t; while(t--) { cin >> n >> k; rep(i,n) cin >> A[i]; if(k == 1) { sum = 0; rep(i,n) sum += A[i]; if (sum % 2 == 1) cout << '1'; else cout << '0'; } 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...