제출 #365965

#제출 시각아이디문제언어결과실행 시간메모리
365965Ahmad_HasanFootball (info1cup20_football)C++17
100 / 100
362 ms2284 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int32_t main() { int t; cin>>t; while(t--){ int n,k; cin>>n>>k; vector<int>v(n); int cnt[65]={0}; for(int i=0;i<n;i++){ cin>>v[i]; for(int j=0;j<40;j++){ cnt[j]+=v[i]/(1ll<<j); } } int f=0; for(int i=0;i<40;i++){ if(k>=(1ll<<i)&&(cnt[i]%2) ) f=1; } if(n==1&&v[0]<=k) f=1; if(f) cout<<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...