# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
464721 | nickmet2004 | Gap (APIO16_gap) | C++11 | 54 ms | 1096 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>
#include "gap.h"
#define ll long long
using namespace std;
ll findGap(int T , int n){
ll ans = 0;
ll x = 0 , y = 1e18 ,mn , mx;
if(T == 1){
for(int i = 1; i < (n + 1) /2; ++i){
MinMax(x , y , &mn , &mx);
if(x) ans = max(ans , mn - x + 1);
if(y != 1e18) ans = max(ans , y - mx + 1);
x = mn + 1;
y = mx - 1;
}
}
return max(ans , mx-mn);
//1 2 3 4 5 6
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |