이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
long long findGap(int T, int N)
{
long long s, t;
MinMax(1, 1000000000000000000, &s, &t);
long long l, r;
l = s + 1;
long long sz = (t - s + 1) / N;
long long lf = s, res = 0;
long long a, b;
while(l < t){
r = l + sz;
MinMax(l, r, &a, &b);
if(a != -1) res = max(res, a - lf);
if(b != -1) lf = b;
l = r + 1;
}
res = max(res, t - lf);
return res;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |