제출 #105996

#제출 시각아이디문제언어결과실행 시간메모리
105996daniel920712Gap (APIO16_gap)C++14
30 / 100
72 ms2040 KiB
#include <iostream> #include "gap.h" using namespace std; long long all[100005]; long long findGap(int T,int N) { long long a,b,l=0,r=N-1,x=0,y=1e18,ans=0; int i; while(l<=r) { //printf("%lld %lld\n",l,r); MinMax(x,y,&a,&b); all[l]=a; all[r]=b; //printf("%lld %lld\n",a,b); x=a+1; y=b-1; l++; r--; } for(i=1;i<N;i++) ans=max(ans,all[i]-all[i-1]); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...