Help with graph problem

Правка en1, от Garfield_, 2017-03-13 21:34:24

You are given a tree,and each node have a number on it.You have to find some nodes a1,a2,a3 ... ,an such a2 is child of a1 ,a3 is child of a2,...an is child of an - 1.We say x is child of y if it's in subtree with root in y. This problem was on Serbian state competition 2014. for seniors,could you give me any hints or pseudocode?

Теги graphs, dfs and similar

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Garfield_ 2017-03-13 21:36:46 61
en1 Английский Garfield_ 2017-03-13 21:34:24 412 Initial revision (published)