| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1365552 | OmarAlimammadzade | Gap (APIO16_gap) | C++20 | 22 ms | 1992 KiB |
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
int findGap(int32_t tc, int32_t n) {
int s = 0, t = 1e18;
int l = 1, r = n;
int a[n];
while (l <= r) {
int mn, mx;
MinMax(s, t, &mn, &mx);
a[l++] = mn;
a[r--] = mx;
s = mn + 1;
t = mx - 1;
}
int ans = 0;
for (int i = 2; i <= n; i++) {
ans = max(ans, a[i] - a[i - 1]);
}
return ans;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
