제출 #639124

#제출 시각아이디문제언어결과실행 시간메모리
639124Dec0DeddFootball (info1cup20_football)C++14
100 / 100
202 ms1412 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 1e5+1; ll a[N], n, k; bool check() { int s=0; for (int i=1; i<=n; ++i) s+=a[i]%2; s%=2; 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; break; } } 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...