# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1091279 | owieczka | Gap (APIO16_gap) | C++17 | 52 ms | 3400 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 ll long long
vector<ll> points;
long long findGap(int T, int N)
{
ll s = 0;
ll t = 1e18;
ll b, e;
ll n = N;
MinMax(s, t, &b, &e);
// musze podzielic na przedziały
ll prz = (e - b)/n + 1;
ll mn, mx;
points.push_back(b);
for (ll i = b + 1; i < e; i+=prz)
{
MinMax(i, i + prz - 1, &mn, &mx);
points.push_back(mn);
points.push_back(mx);
}
mx = 0;
for (ll i = 1; i < points.size(); i++)
{
mx = max(points[i] - points[i-1], mx);
}
return mx;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |