# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
560869 | karrigan | Gap (APIO16_gap) | C++14 | 45 ms | 1940 KiB |
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<bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(false);cin.tie(nullptr);
#include "gap.h"
using namespace std;
const int maxn=1e6;
using ll=long long int;
long long a[100009];
long long findGap(int t, int n){
if (t==1){
a[0]=-1;
a[n+1]=2e18;
for (int i=1,j=n;i<=j;){
MinMax(a[i-1], a[j+1], &a[i], &a[j]);
i++;
j--;
}
long long ans=-1;
for (int i=2;i<=n;i++){
ans=max(ans,a[i]-a[i-1]);
}
return ans;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |