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