This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "gap.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int maxn = 1e5 + 20;
ll a[maxn];
long long findGap(int T, int n)
{
if(T == 1)
{
ll l = 0 , r = 1e18;
for(int i = 0; i < (n + 1) / 2; i++)
{
ll x , y;
MinMax(l , r , &x , &y);
a[i] = x;
a[n - i - 1] = y;
l = x + 1 , r = y - 1;
}
ll res = 0;
for(int i = 1; i < n; i++)
res = max(res , a[i] - a[i - 1]);
return res;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |