#include <bits/stdc++.h>
#include "gap.h"
#define ll long long
#define ull unsigned long long
#define ld long double
#define M 1000000007
#define P complex<long long>
#define X real()
#define Y imag()
using namespace std;
ll findGap(int T, int N) {
if(T == 1) {
ll ans = 0;
ll s=0, t=1e18, mn, mx;
vector<ll> qq;
for(int i=0; i<(n+1)/2; i++) {
MinMax(s, t, &mn, &mx);
if(mn == -1)
break;
qq.push_back(mn);
qq.push_back(mx);
t = mx-1;
s = mn+1;
ll ed = mx;
if(t<s)
break;
}
sort(qq.begin(), qq.end());
for(int i=1; i<qq.size(); i++)
ans = max(ans, qq[i]-qq[i-1]);
return ans;
} else {
return -1;
}
}