제출 #106061

#제출 시각아이디문제언어결과실행 시간메모리
106061daniel920712Gap (APIO16_gap)C++14
0 / 100
97 ms1272 KiB
#include <iostream> #include <algorithm> #include "gap.h" using namespace std; long long findGap(int T,int N) { long long a,b,l=0,r=N-1,x=0,y=1000000000000000000 ,ans=0,c,d,t; MinMax(x,y,&a,&b); x=(b-a)/N+1; t=a; for(;a<=b;a+=x) { l=a; r=min(b,a+x); MinMax(l,r,&c,&d); ans=max(ans,d-c); ans=max(ans,c-t); t=d; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...