| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 161628 | kostia244 | Gap (APIO16_gap) | C++14 | 92 ms | 3900 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;
long long findGap(int T, int N)
{
long long l = 1, r = 1e18, lp = 0, rp = N-1, x=0, y=0, a[100100];
for(int i = 0; lp<=rp; i++) {
MinMax(l, r, &x, &y);
a[lp] = x, a[rp] = y;
l=x+1, r=y-1;
lp++,rp--;
}
ll ans = 0;
for(int i = 1; i < N; i++) {
ans = max(ans, a[i]-a[i-1]);
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
