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>
#define mp make_pair
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define MAXN 100005
#include "gap.h"
typedef long long ll;
using namespace std;
ll findGap(int t,int n){
ll res=0;
ll l,d,tl,td;
MinMax(0ll,1000000000000000000ll,&l,&d);
while(n>2){
MinMax(l+1,d-1,&tl,&td);
//printf(" %lld %lld %lld %lld\n",l,d,tl,td);
res=max(res,max(tl-l,d-td));
l=tl;
d=td;
n-=2;
}
if(n==2)res=max(res,d-l);
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |