제출 #524915

#제출 시각아이디문제언어결과실행 시간메모리
524915alexdumitruFootball (info1cup20_football)C++14
100 / 100
35 ms2244 KiB
#include <bits/stdc++.h> using namespace std; ifstream fin("rollercoaster.in"); ofstream fout("rollercoaster.out"); long long sum; int t,n,k,i,a[100005]; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cin>>t; while(t--) { cin>>n>>k; for(i=1;i<=n;i++) cin>>a[i]; bool ok=0; while(k>0) { sum=0; for(i=1;i<=n;i++) { sum+=a[i]; a[i]/=2; } if(sum%2==1) { cout<<1; ok=1; break; } k/=2; } if(!ok)cout<<0; //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...