摘要: 题:https://ac.nowcoder.com/acm/contest/5672/C 题意:给定树,m个操作:(1)在x点处增加w,树上每个点y的值+=w-dis(x,y)。 (2)将x点处值和0取min (3)查询x点的值 分析:将每个点x 的值展开=w-dep(x)-dep(y)+2*dep 阅读全文
posted @ 2020-08-02 14:53 starve_to_death 阅读(227) 评论(0) 推荐(0) 编辑