# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
876450 | AlphaMale06 | Gap (APIO16_gap) | C++14 | 28 ms | 3808 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>
#include "gap.h"
using namespace std;
using ll=long long;
long long findGap(int subt, int n){
if(subt==1){
ll mn=0;
ll mx=1e18;
ll a[n];
for(int i=0; i< n/2; i++){
MinMax(mn, mx, &mn, &mx);
a[i]=mn;
a[n-i-1]=mx;
mn++;
mx--;
}
if(n&1)a[n/2]=mn;
ll ans=0;
for(int i=1; i<n; i++){
ans=max(ans, a[i]-a[i-1]);
}
return ans;
}
else{
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |