2020年10月3日

P3066 [USACO12DEC] Running Away From the Barn G(树上倍增+差分)

摘要: P3066 [USACO12DEC]Running Away From the Barn G 原题:https://www.luogu.com.cn/problem/P3066 思路:对每个节点i,倍增找到能贡献的最远的点k,问题就相当于i点到k点路径上都+1,树上差分就行。如差分数组cf[i]++ 阅读全文

posted @ 2020-10-03 17:45 Aminers 阅读(128) 评论(0) 推荐(0) 编辑

导航