# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
721957 | Magikarp4000 | Gap (APIO16_gap) | C++17 | 70 ms | 1940 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 INF int(1e9+7)
#define FOR(i,s,n) for (int i = s; i < n; i++)
#define FORR(i,n,s) for (int i = n; i > s; i--)
#define FORX(u, arr) for (auto u : arr)
#define ln '\n'
#define ll long long
#define PII pair<int, int>
#define PLL pair<ll, ll>
#define ALL(v) v.begin(), v.end()
#define PB push_back
#define F first
#define S second
const ll LLINF = 1e18+1;
#define int long long
int findGap(int32_t sub, int32_t n) {
if (sub == 1) {
int l = -1, r = 2e18;
vector<int> a(n,-1);
FOR(i,0,(n+1)/2) {
MinMax(l+1,r-1,&l,&r);
a[i] = l;
a[n-i-1] = r;
}
int res = 0;
FOR(i,0,n-1) res = max(res, a[i+1]-a[i]);
return res;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |