제출 #692167

#제출 시각아이디문제언어결과실행 시간메모리
692167NeroZeinFootball (info1cup20_football)C++14
42 / 100
25 ms340 KiB
#include <bits/stdc++.h> #define int long long using namespace std; #ifdef Nero #include "Deb.h" #else #define deb(...) #endif signed main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while(t--) { int n, k; cin >> n >> k; int sum = 0; int twos = 0; for (int i = 0; i < n; ++i) { int x; cin >> x; sum += x; twos += x / 2; } if (sum & 1LL) { cout << 1; } else if(k == 2) { cout << (twos & 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...