#include "ant.h"
int FindK() {
int l = 1, r = 100000000;
int x = DeliverCount(68000000);
if (x) l = 68000000 / (x+1), r = 68000000 / x;
else l = 68000000, r = 100000000;
while (l+1<r) {
int m = (l+r)/2;
if (DeliverCount(m)) r = m;
else l = m;
}
return r;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
3 ms |
248 KB |
Partially correct : C = 27 |
2 |
Correct |
2 ms |
356 KB |
Correct |
3 |
Correct |
2 ms |
440 KB |
Correct |
4 |
Partially correct |
2 ms |
440 KB |
Partially correct : C = 27 |
5 |
Correct |
2 ms |
440 KB |
Correct |