제출 #818609

#제출 시각아이디문제언어결과실행 시간메모리
818609Soumya1Football (info1cup20_football)C++17
100 / 100
32 ms2004 KiB
#include <bits/stdc++.h> #ifdef __LOCAL__ #include <debug_local.h> #endif using namespace std; void testCase() { int n, k; cin >> n >> k; vector<int> a(n); for (int &i : a) cin >> i; while (true) { int sum = 0; for (int i : a) sum += i % 2; if (sum % 2) { cout << "1"; return; } else if (k == 1) { cout << "0"; return; } else { for (int &i : a) i /= 2; k /= 2; } int s = 0; for (int i : a) s |= i; if (!s) break; } cout << "0"; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int tc; cin >> tc; while (tc--) { testCase(); } 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...