| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 101366 | shafinalam | Gap (APIO16_gap) | C++14 | 65 ms | 2016 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 <bits/stdc++.h>
#include "gap.h"
using namespace std;
typedef long long ll;
const int lim = 4e5+5;
#define sf scanf
#define pf printf
#define inf 1e18
ll arr[lim];
ll findGap(int T, int N)
{
ll s = 0, t = inf, mn, mx;
int l = 1, r = N;
while(l<=r)
{
MinMax(s, t, &mn, &mx);
arr[l++] = mn;
arr[r--] = mx;
s = mn+1;
t = mx-1;
}
ll ans = 0;
for(int i = 2; i <= N; i++) ans = max(ans, arr[i]-arr[i-1]);
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
