Comments
On jethya → Delivery Problem! Zomato!, 5 years ago
0

?

On jethya → Delivery Problem! Zomato!, 5 years ago
0

If the image is not clear,
We have $$$N$$$ houses on $$$x-axis$$$ to where we have to deliver the food and there location is given as vector $$$A$$$. We have to build $$$K$$$ restaurants on locations such that the delivery time is minimized. From any restaurant you can send any number of delivery boys at time $$$0$$$. Time to travel $$$1$$$ unit distance is $$$1$$$ unit. Output the minimum time required to deliver to all houses.

Constraints
$$$1 \lt N, K \lt 10^5$$$
$$$10^{-9} \lt A_i \lt 10^9$$$

Please help!

On jethya → Looks like a Nice Problem, 5 years ago
0

Please read the last line

On jethya → Looks like a Nice Problem, 5 years ago
0

yes, it was disabled and ig everything is clearly visible.

On jethya → Sublime Text | Settings, 5 years ago
0

yeah, please share!

On jethya → Sublime Text | Settings, 5 years ago
0

Updated the post with an image.

On jethya → Sublime Text | Settings, 5 years ago
0

Windows

no way there can be 50k registrations, It's a trap!
just saw the difficulty(too easy) of first question and it's AC(too low out of 50k)
codeforces is the best!

+2

In editorial for Div2 D1,

Find the sum over all $$$z \lt sqrt(x)$$$ directly
is not correct ig. Let's say $$$x = 5$$$ & $$$z = 2$$$, then $$$z \lt sqrt(x)$$$ but $$$5 / 2 = 2$$$ which is less than $$$sqrt(5)$$$ and hence will be covered in loop for $$$c$$$ (refer the editorial).

so loop for $$$z$$$ should be $$$(x / z) \gt sqrt(x)$$$ or $$$z \lt floor(sqrt(x))$$$

correct me if I am wrong.

Deleted

Thanks!