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>
//#include "grader.cpp"
using namespace std;
#define ll long long
ll a[200005],inf=1e18;
ll mx,mn;
long long findGap(int T, int N){
//if(T==1){
ll l=0,r=N,x=0,y=inf;
while(l<r){
MinMax(x,y,&mn,&mx);
a[l++]=mn,a[--r]=mx;
x=mn+1;
y=mx-1;
}
ll ans=0;
for(int i=0;i<N-1;i++)
ans=max(ans,a[i+1]-a[i]);
return ans;
//}
//return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |