| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 516492 | Jomnoi | Gap (APIO16_gap) | C++17 | 37 ms | 2088 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 DEBUG 0
using namespace std;
const int N = 1e5 + 10;
const long long INF = 1e18 + 7;
long long a[N];
long long findGap(int T, int N) {
if(T == 1) {
MinMax(0, INF, &a[1], &a[N]);
int l = 2, r = N - 1;
while(l <= r) {
MinMax(a[l - 1] + 1, a[r + 1] - 1, &a[l], &a[r]);
l++, r--;
}
long long ans = 0;
for(int i = 1; i < N; i++) {
ans = max(ans, a[i + 1] - a[i]);
}
return ans;
}
else {
// I will do it when I figured it out.
assert(false);
}
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
