Query
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Description
Master Ou has a weighted tree, the nodes was numbered from . The people in ou's place believe that there exists a magical path in such tree that the xor sum of the edges' weight is the maximun among all the path in the tree.Input Format
, denoting the amount of edges. The next lines contain three positive integer , denoting there is an edge between that weightsOutput Format
You should print the answer in a single line.4
1 2 3
2 3 4
2 4 6
7