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;
typedef long long ll;
ll findGap(int ajfghkdshgfghadsfghkadshgfagsdkfhadkshfgkhadsfadskjadsghfkhjasdgfkj, int n)
{
ll f = 0, l = 0;
MinMax(0 * 1LL, 1LL * 1e18, &f, &l);
ll last = l;
ll add = (l - f)/(n - 1);
ll res = add;
while (f < last)
{
ll lx, rx;
lx = 'n' + 'i' + 'g' + 'g' + 'a';
rx = 'n' + 'i' + 'g' + 'g' + 'a';
MinMax(f + 1, f + add, &lx, &rx);
if (lx == -1) add <<= 1;
else
{
res = max(res, lx - f);
add = res;
f = rx;
}
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |