| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1350701 | the_commando_x | Gap (APIO16_gap) | C++17 | 19 ms | 1216 KiB |
#include "gap.h"
#include <bits/stdc++.h>
long long findGap(int T, int N)
{
long long MN, MX;
MinMax(0, 1e18 + 1, &MN, &MX);
long long best = 0;
if (T == 1)
{
for (int i = 1; i < (N + 1) / 2; ++i)
{
long long a, b;
MinMax(MN + 1, MX - 1, &a, &b);
best = std::max({best, a - MN, MX - b});
MN = a, MX = b;
}
best = std::max(best, MX - MN);
}
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
