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;
long long findGap(int T, int N){
	long long mn=-1,mx=-1;
	MinMax(1,1000000000000000000,&mn,&mx);
	long long diff = mx-mn;
	long long mxx = mx;
	long long mnd=diff/(N-1);
	long long ans=mn,curm=mn;
	for(long long i=mn+1;i<=mxx;i+=mnd){
		// cout<<i<<' '<<i+mnd-1<<' ';
		MinMax(i,i+mnd-1,&mn,&mx);
		// cout<<mn<<' '<<mx<<endl;
		if(mn==-1) continue;
		// cout<<mn<<' '<<curm<<endl;
		ans=max(ans,mn-curm);
		curm=mx;
	}
	return ans;
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |