Hello.↵
↵
Today I was looking the problems from AtCoder Grand Contest 18. In [problem D](http://agc018.contest.atcoder.jp/tasks/agc018_d) you were asked to find the length of the largest Hamilton Path in a complete graph witgh 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 (well actually even if it's not easy I would appreciate if you share your idea) and also is still fast enough (something like $O(N \log N)$ or faster). ↵
↵
Thanks in advance :)http://agc018.contest.atcoder.jp/tasks/agc018_d
↵
Today I was looking the problems from AtCoder Grand Contest 18. In [problem D](http://agc018.contest.atcoder.jp/tasks/agc018_d) you were asked to find the length of the largest Hamilton Path in a complete graph wit
↵
Thanks in advance :)