# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
110842 | 2019-05-12T12:53:27 Z | tjd229 | The Ant Doing Hard Work (FXCUP3_ant) | C++14 | 2 ms | 384 KB |
#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 / (0 + 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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 384 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |