이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll findGap(int asdposjidfjioafg, int n)
{
ll f = 0, l = 0;
MinMax(0LL, 1LL * 1e18, &f, &l);
ll last = l;
ll add = (l - f)/(n - 1);
ll lim = (l - f - n + 1);
ll res = 0;
while (f < last)
{
ll lx, rx;
lx = f;
rx = l;
MinMax(f + 1, f + add, &lx, &rx);
if (lx == -1)
{
add *= 2;
}
else
{
res = max(res, lx - f);
f = rx;
}
}
return res;
}
컴파일 시 표준 에러 (stderr) 메시지
gap.cpp: In function 'll findGap(int, int)':
gap.cpp:14:8: warning: unused variable 'lim' [-Wunused-variable]
14 | ll lim = (l - f - n + 1);
| ^~~
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |