Submission #639114

#TimeUsernameProblemLanguageResultExecution timeMemory
639114Dec0DeddFootball (info1cup20_football)C++14
0 / 100
209 ms1980 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 1e5+1; ll a[N], n, k; bool check() { ll s=0; for (int i=1; i<=n; ++i) s+=a[i]&1; return s; } void solve() { cin>>n>>k; for (int i=1; i<=n; ++i) cin>>a[i]; bool ans=check(); while (k > 1) { if (check()) ans=true; k/=2; } if (ans) cout<<"1"; else cout<<"0"; } int main() { int t; cin>>t; while (t--) solve(); }
#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...