제출 #845912

#제출 시각아이디문제언어결과실행 시간메모리
845912PiokemonFootball (info1cup20_football)C++17
100 / 100
27 ms860 KiB
#include <bits/stdc++.h> using namespace std; typedef long long int ll; constexpr int N = 1e5; ll a[N+9]; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll t,n,k; cin >> t; while(t--){ cin >> n >> k; for (int x=1;x<=n;x++) cin>>a[x]; bool win=0; while(k>=1){ ll suma = 0; for (int x=1;x<=n;x++) suma+=a[x]; if (suma%2==1) win=1; k/=2; for (int x=1;x<=n;x++) a[x]=a[x]/2; } cout << win; } 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...