| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1045067 | DeathIsAwe | Gap (APIO16_gap) | C++14 | 27 ms | 3652 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;
#define ll long long
long long findGap(int test, int n) {
ll arr[n];
ll s, t, ans;
if (test == 1) {
ans = 0;
s = 0; t = 1e18;
for (int i=0;i<n/2;i++) {
MinMax(s, t, &arr[i], &arr[n - i - 1]);
s = arr[i] + 1; t = arr[n - i - 1] - 1;
}
if (n % 2 == 1) {
MinMax(s, t, &arr[n/2], &arr[n/2]);
}
for (int i=1;i<n;i++) {
ans = max(ans, arr[i] - arr[i-1]);
}
return ans;
}
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
