Submission #832741

#TimeUsernameProblemLanguageResultExecution timeMemory
832741tolbiGap (APIO16_gap)C++17
0 / 100
39 ms1108 KiB
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
long long findGap(int T, int N)
{
	long long l = 1, r = 1e18-1;
	long long ans = 0;
	while (l<r){
		long long newl, newr;
		MinMax(l,r,&newl,&newr);
		ans=max(ans,newl-l+1);
		l=newl+1;
		ans=max(ans,r-newr+1);
		r=newr-1;
	}
	return ans;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...