← Questions
Add one delivery center to minimize the worst distance
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A grid marks delivery centers with 1 and every other cell with 0. The distance between two cells is max(|x1 - x2|, |y1 - y2|) (moving in all eight directions). The grid's inconvenience is the largest distance from any 0 cell to its nearest center. You may turn at most one 0 into a new center. Return the smallest inconvenience you can reach.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
