Techgig Code Gladiators 2022 finale question

Правка en1, от gaurav1903, 2022-08-19 23:05:35

Statement- There are n shops in a circular pattern .Each shop has a requirement of object x given in an array. By mistake orders were shuffled and now wrong orders were delivered to each shop. Now they hired a person to sort this mess.This person would charge 1 USD for taking 1 unit of x by 1 unit distance. Assuming shops are arranged in a circle where 2 closest shops have 1 unit distance between them. What is the minimum cost needed for them to get exactly what they required?

Any help is appreciated or if you could guide me towards a similar problem.

Теги @errichto, techgig, codegladiators, um_nik

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский gaurav1903 2022-08-19 23:05:35 605 Initial revision (published)