随笔分类 -  树上差分

摘要:Description 有一棵点数为 N 的树,以点 1 为根,且树点有边权。然后有 M 个 操作,分为三种: 操作 1 :把某个节点 x 的点权增加 a 。 操作 2 :把某个节点 x 为根的子树中所有点的点权都增加 a 。 操作 3 :询问某个节点 x 到根的路径中所有点的点权和。 有一棵点数为 阅读全文
posted @ 2018-10-16 18:17 Dijkstra·Liu 阅读(323) 评论(0) 推荐(1)
摘要:Description Yixght is a manager of the company called SzqNetwork(SN). Now she's very worried because she has just received a bad news which denotes th 阅读全文
posted @ 2018-10-07 15:31 Dijkstra·Liu 阅读(264) 评论(0) 推荐(0)