#include "gap.h"
// #include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
long long findGap(int t, int n)
{
if(t==1)
{
// we can get array
ll v1,v2;
ll s=-1,t=1e18+1;
ll l=0,r=n-1;
vector<ll> a(n+1);
while(l<=r)
{
MinMax(s,t,&v1,&v2);
a[l]=v1;
a[r]=v2;
l++;
r--;
s=v1+1;
t=v2-1;
}
ll mx=0;
for(int i=1;i<n;i++)
{
mx=max(mx,a[i]-a[i-1]);
}
return mx;
}
else
{
// we can get array in
}
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |