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;
const long long K=1000000000000000000LL;
long long a,b,c,d,e,i,j,ii,jj,zx,xc,lef,rig,mid,f[100009];
int B,C,D,E;
long long findGap(int T, int NN)
{
a=NN;
if(T==1||1==1){
lef=0;rig=K;
zx=0;
while(1){
MinMax(lef,rig,&c,&d);
if(c==-1){
break;
}
if(c==d){
zx++;
f[zx]=c;
break;
}
zx++;
f[zx]=c;f[a-zx+1]=d;
lef=c+1;rig=d-1;
}
e=0;
for(i=1; i<a; i++){
e=max(e,f[i+1]-f[i]);
}
return e;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |