const long long MAXN = 1e18;
long long findGap(int, int);
void MinMax(long long , long long , long long *, long long *)
long long findGap(int T, int N)
{
long long mmin, mmax;
MinMax(0LL,MAXN,&mmin,&mmax);
long long gap = (mmax-mmin-1)/(N-1), res = -1;
long long L = mmin+1, prevMax = mmin;
while(L+gap<=mmax)
{
long long curMin, curMax;
MinMax(L,L+gap,&curMin,&curMax);
if(curMin != -1 && curMax != -1)
{
long long curDiff = curMin - prevMax;
res = (curDiff > res ? curDiff : res);
prevMax = curMax;
}
L += gap+1;
}
return res;
}
Compilation message
gap.cpp:5:1: error: expected initializer before 'long'
long long findGap(int T, int N)
^