이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include <bits/stdc++.h>
#pragma GCC target("sse,sse2,avx2")
#pragma GCC optimize("unroll-loops,O2")
#define rep(i,l,r) for (int i = l; i < r; i++)
#define repr(i,r,l) for (int i = r; i >= l; i--)
#define X first
#define Y second
#define all(x) (x).begin() , (x).end()
#define pb push_back
#define endl '\n'
#define debug(x) cerr << #x << " : " << x << endl;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pll;
constexpr int N = 1e5+15,mod = 1e9+7;
constexpr ll inf = 1e18+10;
ll a[N];
long long findGap(int T, int n)
{
if (T == 2) return 0;
int m = (n+1)/2;
ll x = -inf,y = inf;
rep(i,0,m){
MinMax(x,y,a+i,a+n-i-1);
x = a[i]+1;
y = a[n-i-1]-1;
}
ll ans = 0;
rep(i,1,n) 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... |