Submission #1105854

#TimeUsernameProblemLanguageResultExecution timeMemory
1105854abushbandit_Football (info1cup20_football)C++17
0 / 100
20 ms760 KiB
#include "bits/stdc++.h" #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") using namespace std; //~ #ifndef ONLINE_JUDGE //~ #include "debug.h" //~ #else //~ #define debug(...) //~ #define debugArr(...) //~ #endif #define int long long #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define ff first #define ss second #define pb push_back template<class T, class U> inline bool chmin(T& a, const U& b) { if (a > b) { a = b; return true; } return false; } template<class T, class U> inline bool chmax(T& a, const U& b) { if (a < b) { a = b; return true; } return false; } const int inf = 2e18; const int mod = 1e9 + 7; const int N = 2e5 + 1; void solve(){ int n,k; cin >> n >> k; int a[n]; for(int i = 0;i < n;i++) cin >> a[i]; if(a[0] % 2 == 0) { if(k >= a[0]) { cout << 1; } else if(k == 1) { cout << 0; } else if(a[0] / k % 2 == 0) { cout << 0; } else { cout << 1; } } else { cout << 1; } } signed main() { ios_base::sync_with_stdio(false); cin.tie(nullptr);cout.tie(nullptr); int T = 1; 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...