# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
71856 | 비타오백 (#119) | The Ant Doing Hard Work (FXCUP3_ant) | C++17 | 0 ms | 0 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 lo = 1, hi = 1e8;
int f = 0;
while(lo < hi) {
int mid = (lo + hi) / 2;
if(!f) f = 1, mid = (1<<26)-1;
int x = DeliverCount(mid);
if(!x) lo = mid + 1;
else {
lo = max(lo, (mid+x)/(x+1));
hi = min(hi, mid/x);
}
}
return lo;
}