Submission #365909

#TimeUsernameProblemLanguageResultExecution timeMemory
365909aihayFootball (info1cup20_football)C++14
100 / 100
259 ms1532 KiB
#pragma GCC optimize ("O3") #pragma GCC optimize ("unroll-loops") #pragma GCC optimize("-Ofast") #include <bits/stdc++.h> using namespace std; typedef int in; #define f first #define s second #define pb push_back #define pp push #define ceil(x) NEVER USE CEIL #define sqrt(x) (int)(sqrt(x)) int arr[1000010]; in main() { ios_base::sync_with_stdio(0); int tc=1; cin>>tc; while(tc--) { int n,k,sum; cin>>n>>k; for(int i=0;i<n;i++) cin>>arr[i]; int ans=0; for(int i=0;(1<<i)<=k;i++){ sum=0; for(int j=0;j<n;j++) sum+=arr[j]; if(sum%2){ ans=1; break; } for(int j=0;j<n;j++) arr[j]/=2; } cout<<ans; } 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...