#include "ant.h"
int FindK() {
int i=1,l=0,r=0;
while(i<100000000){
if(DeliverCount(i)==0){
i*=2;
}
else break;
}
l=i/2;
r=((i>=100000000)?100000000:i);
while(l<r-1){
int mid=(l+r)/2;
if(DeliverCount(mid)==0){
l=mid;
}
else r=mid;
}
return r;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
2 ms |
256 KB |
Partially correct : C = 52 |
2 |
Partially correct |
2 ms |
492 KB |
Partially correct : C = 52 |
3 |
Partially correct |
2 ms |
492 KB |
Partially correct : C = 40 |
4 |
Partially correct |
2 ms |
492 KB |
Partially correct : C = 52 |
5 |
Partially correct |
3 ms |
492 KB |
Partially correct : C = 40 |