이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define ff first
#define ss second
ll findGap(int T, int N) {
ll L, R;
MinMax(0LL, (ll)1e18 + 10, &L, &R);
ll d = (R - L) / (ll)N;
ll mn[N], mx[N];
mn[0] = L, mx[N - 1] = R;
for(int i = 0; i < N; i++)
MinMax(L + d * i, L + d * (i + 1), &mn[i], &mx[i]);
ll ans = 0;
for(int i = 1; i < N; i++)
ans = max(ans, mn[i] - mx[i - 1]);
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |