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<iostream>
#include<utility>
#include<string>
#include<vector>
#include<algorithm>
#include<deque>
#include<queue>
#include<set>
#include<map>
#include<functional>
using namespace std;
#define LL long long
#define ALF "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define LLBIG 1999999999999999999
#define INTBIG 1111111111
#define MOD 1000000007
#define PI pair<int,int>
#define VI vector<int>
#define VVI vector<vector<int>>
#include"gap.h"
//MinMax(int,int,int&,int&)
long long findGap(int T, int N){
if(T==1){
LL A[100002];
LL l=0, r=1000000000000000000LL;
for(int i=0; i<(N+1)/2; i++){
MinMax(l, r, &A[i], &A[N-1-i]);
l = A[i]+1; r = A[N-1-i]-1;
}
LL ans = 0;
for(int i=0; i<N-1; i++)
ans = max(ans, A[i+1] - A[i]);
return ans;
}
else return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |