# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1015096 | vjudge1 | Gap (APIO16_gap) | C++17 | 23 ms | 2328 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 "gap.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
int findGap(signed t,signed n)
{
int a[n],i=0,j=n-1,*mn,*mx,lim1=0,lim2=1e18;
while (i<=j)
{
MinMax(lim1,lim2,mn,mx);
a[i++]=*mn;
a[j--]=*mx;
lim1=*mn+1;
lim2=*mx+1;
}
int ans=0;
for (int i=0;i<n-1;i++)
ans=max(ans,a[i+1]-a[i]);
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |