Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

How to find all the edges shared by all diameters of a tree?
Разница между en1 и en2, 123 символ(ов) изменены
Given a tree, I need to find all the edges that are shared by all diameters of that tree. In other words, let D be the length of the longest path in the tree and P be the set of all paths in the tree with length = D. I need to find the intersection of the edges shared by all paths in P. How can I do that? Please do not just mention the algorithm, I would appreciate if you can share the theoretical justification of why it works too (links to lectures or any resources are also very appreciated).↵

Thank you very much.


Update: I need to know how to do this in order to solve this problem: https://www.codechef.com/MARCH13/problems/SUBTREE

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский pabloskimg 2019-09-10 01:48:33 424
en2 Английский pabloskimg 2019-09-10 01:10:28 123
en1 Английский pabloskimg 2019-09-09 23:00:56 582 Initial revision (published)