题目: #10056. 「一本通 2.3 练习 5」The XOR-longest Path 解析: 做完#10051后就不是很难了 继续利用异或的性质有\(dis(u,v) = dis(1,u)\oplus dis(1,v)\) 把边权放到点上,然后字典树求最大异或值 代码 #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 10; int n, m, num, cnt, tot, ans; int id[N], a[N], head[N], sum[N]; bool vis[N]; struct n...