Submission #365923

#TimeUsernameProblemLanguageResultExecution timeMemory
365923Blobo2_Blobo2Football (info1cup20_football)C++14
50 / 100
44 ms748 KiB
/* Editor: Abdelrahman Hossam Nickname: Blobo2_Blobo2 IOI next year isA :) */ //#pragma GCC optimize ("O3") //#pragma GCC optimize ("unroll-loops") #include<bits/stdc++.h> #define int long long #define endl "\n" #define PI 3.1415926535897932384626433 #define ceil1(a,b) (a+(b-1))/b #define all(v) v.begin(),v.end() #define gen(arr,n,nxt) generate(arr,arr+n,nxt) #define base ios_base::sync_with_stdio(false);cin.tie(0); #define open freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout); using namespace std; const int mo=1e9+7; int nxt(){int x;cin>>x;return x;} int mod(int n,int m){int ans=n%m;if(ans<0)ans+=m;return ans;} signed main(){ base int qu=nxt(); while(qu--){ int n=nxt(),k=nxt(); int arr[n]; gen(arr,n,nxt); int cnt=0; for(int i=0;i<n;i++)cnt+=arr[i]; int c=1; while(!(cnt%2))cnt/=2,c*=2; if(c>k)cout<<0; else cout<<1; } 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...