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;
typedef long long int ll;
ll n,s,l,r,x,y,z,w,a[1100000],i,j,k,m;
long long findGap(int T, int N)
{
    n=N;
    if(T==1)
    {
        l=0;
        r=1e18-1;
        x=1;
        y=n;
        while(l<r)
        {
            MinMax(l,r,&l,&r);
            a[x]=l;
            a[y]=r;
            x++;
            y--;
            if(l==r||x>y)
                break;
            l++;
            r--;
        }
        for(i=1;i<n;i++)
        {
            s=max(s,a[i+1]-a[i]);
        }
        return s;
    }
	return 0;
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |