标签:following and eve bbs lan ges class memory 节点
传送门 :http://www.lydsy.com/JudgeOnline/problem.php?id=1954
The xor-longest path is 1->2->3, which has length 7 (=3 ⊕ 4)
注意:结点下标从1开始到N....
对于x,y之间的异或和,等于x到根节点的异或和 ^ y到根节点的异或和。
然后把它们丢到trie里,贪心就好。
代码待补
[bzoj 1954]Pku3764 The xor-longest Path
标签:following and eve bbs lan ges class memory 节点
原文地址:http://www.cnblogs.com/kvrmnks/p/6917317.html