This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
const long long MAXN = 1e18;
void MinMax(long long , long long , long long *, long long *);
long long findGap(int T, int N)
{
long long aray[N], i = 0, j = N-1, lo = 0, hi = MAXN;
while(j-i >= 0)
{
long long x, y;
MinMax(lo,hi,&x,&y);
aray[i] = x, aray[j] = y;
i++, j--;
lo = x+1;
hi = y-1;
}
long long res = -1;
for(int i = 0; i+1 < N; i++)
res = (res < aray[i+1]-aray[i] ? aray[i+1]-aray[i] : res);
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |