Submission #1029368

#TimeUsernameProblemLanguageResultExecution timeMemory
1029368elotelo966Football (info1cup20_football)C++17
100 / 100
21 ms2176 KiB
#pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> using namespace std; #define int long long #define OYY LLONG_MAX #define mod 998244353 #define faster ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define FOR for(int i=1;i<=n;i++) #define mid (start+end)/2 #define lim 1000005 #define fi first #define se second int32_t main(){ faster int t=1;cin>>t; while(t--){ int n,k;cin>>n>>k; int dizi[n+1]; int sum=0; FOR{ cin>>dizi[i]; sum+=dizi[i]; } if(sum&1){ cout<<"1"; continue; } bool stop=0; while(k>1){ sum=0; FOR{ dizi[i]/=2; sum+=dizi[i]; } k/=2; if(sum&1){ stop=1; break; } if(sum==0){ break; } } if(stop)cout<<"1"; else cout<<"0"; } 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...