We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Minimum Time Required
- Discussions
Minimum Time Required
Minimum Time Required
Sort by
recency
|
155 Discussions
|
Please Login in order to post a comment
ez
let M be the min element of machines, then M*goal is 10^18 at most = 2^64 at most
O(n * log(M * goal)), the log cannot exceed 64
why is this TLE? I am using binary search and the last for loop -- couldn't possibly go too much back.
The binary search is certainly a great idea, but solutions I see all start from 0 or 1. The minum days is fastest-machine/number-of-machines * item_targets and the maxium days is slowest-machine/number-of-machines * item_targets:
JS binary search