제출 #1100711

#제출 시각아이디문제언어결과실행 시간메모리
1100711Kirill22Football (info1cup20_football)C++17
100 / 100
33 ms2404 KiB
#include "bits/stdc++.h" using namespace std; void solve() { int n, k; cin >> n >> k; map<int, int> cnt; for (int i = 0; i < n; i++) { int x; cin >> x; cnt[x]++; } vector<int> a; for (auto& [x, y] : cnt) { if (y % 2) { a.push_back(x); } } for (int x = 1; x <= k; x *= 2) { long long sum = 0; for (auto& y : a) { sum += y / x; } if (sum % 2) { cout << 1; return; } } cout << 0; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t = 1; cin >> t; while (t--) { solve(); } }
#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...