제출 #679987

#제출 시각아이디문제언어결과실행 시간메모리
679987BeveritaFootball (info1cup20_football)C++17
100 / 100
243 ms560 KiB
#include <bits/stdc++.h> using namespace std; int t, n, i, m, xorr, k, ok, j; signed main() { cin >> t; while (t--) { cin >> n >> k; xorr = 0, j = 0; while (k >= (1 << j)) j++; j--; for (i = 1; i <= n; i++) { cin >> m; xorr ^= m; } ok = 0; for (i = 0; i <= j; i++) { if ((xorr & (1 << i))) { cout << 1; ok = 1; break; } } if (ok == 0) cout << 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...