# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
464637 | nickmet2004 | Gap (APIO16_gap) | C++11 | 0 ms | 0 KiB |
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 ll long long
using namespace std;
ll findGap(int T , int n){
if(T==1){
ll x =0, y = 1e18,lsx = 0 , lsy = 0 , ANS =0;
for(int i = 1; i<= (n + 1) /2; ++i){
Minmax(x , 1e18 , &mn , &mx);
ANS = max(ANS , mn - lsx);
Minmax(0 , y , &mn , &mx);
ANS = max(ANS , y - mx);
x = mn + 1;
y = mx - 1;
}
}
return ANS;
}