# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
48387 | BThero | Gap (APIO16_gap) | C++17 | 83 ms | 2968 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.
// Why am I so stupid? :c
#include <bits/stdc++.h>
#include "gap.h"
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
typedef long long ll;
using namespace std;
long long findGap(int t, int n) {
ll arr[n * 2 + 5], que[2], ret = 0;
int sz = 0;
if (n <= 5) {
arr[0] = 0, arr[n + 1] = (ll)1e18 + 1;
int l = 1, r = n;
while (l <= r) {
MinMax(arr[l - 1] + 1, arr[r + 1] - 1, arr + l, arr + r);
++l, --r;
}
for (int i = 1; i < n; ++i) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |