Блог пользователя Chenghiz

Автор Chenghiz, история, 7 лет назад, По-английски

I have been given a weighed undirected tree. For each subtree of this tree, I need to find the node from which the sum of distances to all other nodes in the subtree is minimum.

The no. of nodes in the tree is of the order of 10^5.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
7 лет назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

You want centroid of every subtree, this problem was in some CF round last year.