摘要: 题解 考虑一个点的贡献,如果过这个点的路径,有偶数条,则贡献为0,否则贡献为这个点的权值。最后所有点的贡献的异或和就是答案。 代码 ~~~c++ include using namespace std; const int N = 500005; int n; int cnt[N], a[N]; v 阅读全文
posted @ 2018-12-01 22:25 天之道,利而不害 阅读(218) 评论(0) 推荐(0)