会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
starve_to_death
博客园
首页
新随笔
联系
订阅
管理
2020年8月2日
C A National Pandemic(树上点扩减值,树剖)
摘要: 题: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)
编辑
公告