摘要: 题:https://codeforces.com/problemset/problem/242/E?csrf_token=e91633dfd98d038f51cc388731fe3f4d 题意:俩个操作,操作1:(l,r,x),区间[l,r]的数全部异或上x。操作2:(l ,r)输出区间[l,r]和 阅读全文
posted @ 2020-03-30 23:53 starve_to_death 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 题:https://ac.nowcoder.com/acm/contest/4853/E 题意:对于一对点(u,v)要是dis(u,v)==k,就会对这对点的LCA产生a[x]+a[y]的贡献(LCA!=u&&LCA!=v) 分析:简单的dsu,把每个点当作LCA去统计子树深度个数,经过LCA的路径 阅读全文
posted @ 2020-03-30 11:53 starve_to_death 阅读(149) 评论(0) 推荐(0) 编辑