#include <bits/stdc++.h>
#include "ant.h"
using namespace std;
int FindK(){
int l=1; int r=1e8-1;
int mid=r;
int tmp=DeliverCount(mid);
if(tmp){
r=mid/tmp;
l=max(mid/(tmp+1)+1,l);
}
else l=mid+1;
while(l<r){
int mid=(l+r)/2;
int tmp=DeliverCount(mid);
if(tmp){
r=mid/tmp;
l=max(mid/(tmp+1)+1,l);
}
else l=mid+1;
}
return l;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
3 ms |
376 KB |
Partially correct : C = 27 |
2 |
Partially correct |
2 ms |
376 KB |
Partially correct : C = 27 |
3 |
Correct |
3 ms |
556 KB |
Correct |
4 |
Partially correct |
2 ms |
556 KB |
Partially correct : C = 27 |
5 |
Correct |
2 ms |
556 KB |
Correct |