# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|
182412 | | AQT | Gap (APIO16_gap) | C++14 | | 58 ms | 3960 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"
using namespace std;
long long arr[100005];
long long findGap(int T, int N){
int l = 1, r = N;
long long lstl = 0, lstr = 1000000000000000000LL;
while(l <= r){
MinMax(lstl+1, lstr-1, &lstl, &lstr);
arr[l++] = lstl, arr[r--] = lstr;
}
long long ans = 0;
for(int i = 2; i<=N; i++){
ans = max(ans, arr[i]-arr[i-1]);
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |