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;
long long findGap(int T, int n)
{
long long a[n];
int cur = 0;
MinMax(0,1000000000000000000,a,a+n-1);
cur++;
while (cur < (n+1)/2){
//printf("%d ",cur);
MinMax(a[cur-1]+1,a[n-cur]-1,a+cur,a+n-1-cur);
cur++;
}
long long ans = 0;
for (int i = 1; i < n; i++){
//printf("%lld %lld, ",a[i],a[i-1]);
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... |