Submission #675312

#TimeUsernameProblemLanguageResultExecution timeMemory
675312hotboy2703Football (info1cup20_football)C++14
100 / 100
41 ms600 KiB
#include<bits/stdc++.h> using namespace std; int a[100100]; int b[100100]; int main(){ ios_base::sync_with_stdio(0);cin.tie(nullptr);cout.tie(nullptr); int t; cin>>t; while (t--){ int n,k; cin>>n>>k; for (int i = 1;i <= n;i++)cin>>a[i]; while (1){ long long cnt[2] = {}; for (int i = 1;i <= n;i ++)cnt[a[i] & 1]+=a[i]; if (k == 1){ cout<<(cnt[1]&1); break; } else{ if (cnt[1] & 1){ cout<<1; break; } else{ k /= 2; for (int i =1;i <=n;i++)a[i] /= 2; } } } } 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...