| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 95615 | jeff | Gap (APIO16_gap) | C++14 | 68 ms | 2960 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;
long long findGap(int T, int N) {
long long l, r, y, z, ls = -1, rs = 0, a, b, i;
MinMax(0, 1000000000000000000, &y, &z);
for (i = 0; b < z; ++i) {
a = y + ((z - y) / N + 2) * i;
b = y + ((z - y) / N + 2) * (i + 1);
if (a >= b) continue;
MinMax(a, b, &l, &r);
if (l < 0 && r < 0) continue;
if (ls > -1) rs = max(rs, l - ls);
ls = r;
}
return rs;
}Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
