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 <bits/stdc++.h>
#include "gap.h"
using namespace std;
#define ll long long
ll findGap(int T, int n){
ll L,P;
MinMax(0,1e18,&L,&P);
ll ans=0,x,y;
while(true){
MinMax(L+1,P-1,&x,&y);
if (x==-1){
ans=max(ans,P-L);
return ans;
}
else ans=max({ans,x-L,P-y});
L=x;
P=y;
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |