Question about AtCoder Grand Contest 18 Problem D.

Revision en2, by radoslav11, 2017-07-26 16:27:27

Hello.

Today I was looking the problems from AtCoder Grand Contest 18. In problem D you were asked to find the length of the largest Hamilton Path in a comete graph witg edges between two vertices equal to the length between these two vertices in a given tree. In the problem you need to find just the length of the path and the solution which I found to the problem can do this. But unfortunately it can just give the length of the path, not the order in which we visit the vertices (my solution is similar to the one in the editorial). So is there a solution with which the order we visit the vertices is easily recoverable and also is still fast enough (something like or faster). Thanks in advance :)http://agc018.contest.atcoder.jp/tasks/agc018_d

Tags atcoder, tree, hamilton paths

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English radoslav11 2017-07-26 16:42:18 186 Tiny change: ' faster). Thanks in ' -> ' faster). \n\nThanks in ' (published)
en2 English radoslav11 2017-07-26 16:27:27 68
en1 English radoslav11 2017-07-26 16:26:36 770 Initial revision (saved to drafts)