# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1027560 | Gangsta | Gap (APIO16_gap) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "bits/stdc++.h"
#include "gap.h"
#define ll long long
#define pb push_back
#define pii pair<ll,ll>
#define ff first
#define ss second
#define sz size()
const int N = 2e5 + 1;
using namespace std;
ll ans;
// void MinMax(ll s, ll t, ll &mn, ll &mx){
// }
ll findGap(int t, int n){
ll mn = 1, mx = 1e18, tmp, tmp1;
if(t == 1){
while(1){
tmp = mn, tmp1 = mx;
MinMax(mn, mx, mn, mx);
if(mn == -1) return ans;
ans = max({ans,mn-tmp, tmp1-mx});
}
}
}
// int main(){
// int n, t;
// cin >> t >> n;
// cout << findGap(t, n);
// }