Submission #388950

#TimeUsernameProblemLanguageResultExecution timeMemory
388950mosiashvililukaGap (APIO16_gap)C++14
0 / 100
55 ms1860 KiB
#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){ if(lef>rig) break; 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...