#include "ant.h"
int mi=1, mx=99999999, md, dap;
int FindK() {
while(1){
md = (mi+mx*2)/3;
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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
3 ms |
220 KB |
Partially correct : C = 43 |
2 |
Partially correct |
2 ms |
488 KB |
Partially correct : C = 40 |
3 |
Correct |
3 ms |
544 KB |
Correct |
4 |
Partially correct |
3 ms |
544 KB |
Partially correct : C = 43 |
5 |
Correct |
1 ms |
544 KB |
Correct |