제출 #639116

#제출 시각아이디문제언어결과실행 시간메모리
639116Dec0DeddFootball (info1cup20_football)C++14
24 / 100
191 ms2096 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) { for (int i=1; i<=n; ++i) a[i]/=2; k/=2; if (check()) ans=true; } 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...