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