Submission #42635

#TimeUsernameProblemLanguageResultExecution timeMemory
42635fefeGap (APIO16_gap)C++14
0 / 100
57 ms1392 KiB
#include "gap.h" #include<stdio.h> #define f MinMax #define max(x,y) ((x)>(y)?(x):(y)) long long findGap(int T, int N) { long long s,e,ps,pe,maxx=0; if(T==1){ f(0,(1LL<<62),&ps,&pe); N-=2; if(N==0) return pe-ps; while(N){ f(ps+1,pe-1,&s,&e); N-=2; maxx=max(maxx,max(s-ps,pe-e)); ps=s;pe=e; } return max(maxx,pe-ps); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...