이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const ll inf = 2e18;
ll findGap(int T, int N) {
ll L, R;
MinMax(0,inf,&L,&R);
ll sz = (R-L-1)/(N-1);
ll ans = 0, last = L;
for(ll x=L+1;x<=R-1;x+=sz) {
ll t1, t2;
MinMax(x,min(R-1,x+sz-1),&t1,&t2);
if(t1==-1) continue;
ans = max(ans, t1-last);
last = t2;
}
ans = max(ans, R-last);
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |