随笔分类 -  trie

摘要:题目链接 先求每个点到根的异或和 然后就要找出两个点,使dis[a]^dis[b]最大 注意异或的性质,我们可以用trie树,沿着与当前数字每位的相反方向走 1 #include<algorithm> 2 #include<iostream> 3 #include<cstdlib> 4 #inclu 阅读全文
posted @ 2016-02-26 08:26 HugeGun 阅读(187) 评论(0) 推荐(0)