# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
387530 | MeGustaElArroz23 | 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>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
ll findGap(int T, int n){
if (T==1){
vi v(n);
auto l=v.begin();
auto r=v.end();
ll up=1e18,low=0;
r--;
for (int i=0;i<(n+1)/2;i++){
MinMax(low,up,l,r);
low=*l+1;
up=*r-1;
l++;
r--;
}
ll mejor=0;
for (int i=0;i<n-1;i++){
mejor=max(mejor,v[i+1]-v[i]);
}
}
}