Spot the problem

Правка en1, от longrange, 2023-03-16 07:25:55

Reference to link

My solution is to sort the distances and arrange them in a cyclic order(except the last one). Then add edges of negative weight to minimize the sum. This yields the answer to be -1*(max_element in distances) [except when n=2]. What is wrong with my algo?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский longrange 2023-03-16 07:25:55 428 Initial revision (published)