이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#define SZ 100005
#include <iostream>
typedef long long ll;
using namespace std;
ll a[SZ];
long long findGap(int T, int N)
{
ll st = 0, en = 1e18, i = 0, j = N - 1, mn, mx, ans;
while (i <= j) {
MinMax(st, en, &mn, &mx);
a[i] = mn;
a[j] = mx;
st = mn + 1;
en = mx - 1;
i++;
j--;
}
ans = a[1] - a[0];
for (i = 1; i < N - 1; i++) {
ans = max(ans, a[i + 1] - a[i]);
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |