제출 #690704

#제출 시각아이디문제언어결과실행 시간메모리
690704MateiKing80Football (info1cup20_football)C++14
100 / 100
212 ms2020 KiB
#include <iostream> using namespace std; int v[100005]; int main() { int n,t,k,sum=0; cin>>t; for(int i=0;i<t;i++) { sum=0; cin>>n>>k; for(int i=0;i<n;i++) cin>>v[i],sum+=v[i],sum%=2; if(sum==1) cout<<1; else { int ok=0; while(k>1) { k/=2; sum=0; for(int i=0;i<n;i++) v[i]/=2,sum+=v[i],sum%=2; if(sum==1) { 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...