# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
109181 | tjd229 | The Ant Doing Hard Work (FXCUP3_ant) | C++14 | 3 ms | 388 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 "ant.h"
int FindK() {
int l = 1, r = 1e8; --r;
int K = 0;
int m = (r / 3) << 1;
int cnt = DeliverCount(m);
if (cnt) {
l = m / (1 + cnt);
if (!l) ++l;
r = l + l;
}
else l = m + 1;
while (l <= r) {
m = (l + r) >> 1;
if (DeliverCount(m)) r = m - 1;
else l = m + 1;
}
return r+1;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |