会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
啦啦啦
博客园
首页
联系
订阅
管理
2018年12月1日
Xor Path - 牛客
摘要: 题解 考虑一个点的贡献,如果过这个点的路径,有偶数条,则贡献为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)
公告