Maximum to be Minimised

Правка en1, от gXa, 2017-05-25 10:36:40

Hi, I have a question:

You are given 100 stations and distance between each adjacent stations. Now you have to select 10 stations(means 10 hops) among those 100 stations in such a way that maximum of distance between any 2 hops will be minimised. By default 1 and 100 stations are selected , so you need to choose only 8 more stations.

Here n=100 I have chosen but n can be large( so bruteforce won't work ).
Теги dynamic programming, binary search

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский gXa 2017-05-25 10:36:40 460 Initial revision (published)