제출 #832751

#제출 시각아이디문제언어결과실행 시간메모리
832751tolbiGap (APIO16_gap)C++17
0 / 100
34 ms1120 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; long long findGap(int T, int N) { long long l, r; MinMax(0,1e18,&l,&r); l++,r--; long long ans = 0; while (l<r){ long long newl, newr; MinMax(l,r,&newl,&newr); if (newl==-1) { ans=max(ans,r-l+2); break; } ans=max(ans,newl-l+1); l=newl+1; ans=max(ans,r-newr+1); r=newr-1; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...