#include "ant.h"
int mi=1, mx=99999999, md, dap;
int FindK() {
while(1){
md = (mi+mx)/2;
if(mi==mx) break;
int C = DeliverCount(md);
int nmi=mi, nmx=mx;
nmi = md/(C+1)+1;
if(C) nmx = md/C;
if(mi < nmi) mi = nmi;
if(mx > nmx) mx = nmx;
}
return md;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
0 ms |
248 KB |
Partially correct : C = 27 |
2 |
Partially correct |
2 ms |
404 KB |
Partially correct : C = 27 |
3 |
Correct |
3 ms |
416 KB |
Correct |
4 |
Partially correct |
2 ms |
416 KB |
Partially correct : C = 27 |
5 |
Correct |
2 ms |
468 KB |
Correct |