이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 1e5;
int T, N;
ll A[MAXN+10], ans;
ll findGap(int _T, int _N)
{
int i, j;
T=_T; N=_N;
ll s=0, t=1e18;
for(i=1, j=N; i<=j; i++, j--)
{
ll a, b;
MinMax(s, t, &a, &b);
A[i]=a; A[j]=b;
s=a+1; t=b-1;
}
for(i=2; i<=N; i++) ans=max(ans, A[i]-A[i-1]);
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |