| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 720827 | Joshc | Gap (APIO16_gap) | C++11 | 43 ms | 1872 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 "gap.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll findGap(int T, int N) {
vector<ll> a(N);
int l = 0, r = N-1;
ll p = -1, q = (1e18)+1;
while (l <= r) {
MinMax(p+1, q-1, &p, &q);
a[l++] = p;
a[r--] = q;
}
ll res = 0;
for (int i=1; i<N; i++) res = max(res, a[i] - a[i-1]);
return res;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
