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