제출 #523819

#제출 시각아이디문제언어결과실행 시간메모리
523819MagiFootball (info1cup20_football)C++17
100 / 100
44 ms2136 KiB
#include <iostream> #include <cstring> using namespace std; int cnt[50]; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while(t--){ int n, k; memset(cnt, 0, sizeof(cnt)); cin >> n >> k; for(int i=1; i<=n; i++){ int x; cin >> x; for(int bit=0; (1<<bit)<=x; bit++) if(x & (1 << bit)) cnt[bit]++; } bool ok = false; for(int bit=0; (1<<bit)<=k; bit++) if(cnt[bit] & 1){ ok = true; break; } cout << ok; } cout << '\n'; 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...