# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1100302 | adkjt | 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 "gap.h"
#include<bits/stdc++.h>
using namespace std;
#define int long long
int *pl,*pr;
int l=0,r=1e18;
long long findGap(int T, int N)
{
int mx=0;
if(T==1)
{
MinMax(l,r,pl,pr);
l=*pl,r=*pr;
while(pl!=pr){
MinMax(l,r,pl,pr);
mx=max({mx,*pl-l,r-*pr});
l=*pl,r=*pr;
}
}
return mx;
}