이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "gap.h"
#define int long long
using namespace std;
//#define DEBUGGING
#ifdef DEBUGGING
#include "../debug.h"
#else
#define debug(x...) void(42)
#endif
int subtask1(int n)
{
vector<int> v(n);
int l, r;
MinMax(0, 1e18, &l, &r);
l++;
r--;
int res = 0;
while (r>l)
{
debug(l, r);
int a, b;
MinMax(l, r, &a, &b);
if (a == -1)
break;
debug(a, l, b, r);
res = max({res, a - l + 1, r - b + 1});
l = a+1;
r = b-1;
}
debug(l, r);
res = max(res, r-l+2);
return res;
}
int findGap(int32_t t, int32_t n)
{
return subtask1(n);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |