제출 #464715

#제출 시각아이디문제언어결과실행 시간메모리
464715nickmet2004Gap (APIO16_gap)C++11
0 / 100
47 ms1180 KiB
#include<bits/stdc++.h> #include "gap.h" #define ll long long using namespace std; ll findGap(int T , int n){ ll ans = 0; if(T == 1){ ll x = 0 , y = 1e18; for(int i = 1; i <= (n + 1) /2; ++i){ ll mn , mx; MinMax(x , y , &mn , &mx); if(x) ans = max(ans , mn - x + 1); if(y != 1e18) ans = max(ans , y - mx + 1); if(i == (n + 1) /2) ans = max(ans , mx - mn); x = mn + 1; y = mx - 1; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...