
树链剖分
树链剖分
olamins_
退役acmer
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces Round #200 (Div. 1) D. Water Tree (树链剖分)
D. Water Treetime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMad scientist Mike has constructed a rooted tree, which consists ofnvertices. Each vertex is a reservoir which can be eit..原创 2020-07-01 09:21:09 · 261 阅读 · 0 评论 -
洛谷P4315 月下“毛景树” (树链剖分&线段树)
题目描述毛毛虫经过及时的变形,最终逃过的一劫,离开了菜妈的菜园。 毛毛虫经过千山万水,历尽千辛万苦,最后来到了小小的绍兴一中的校园里。爬啊爬~爬啊爬毛毛虫爬到了一颗小小的“毛景树”下面,发现树上长着他最爱吃的毛毛果~ “毛景树”上有N个节点和N-1条树枝,但节点上是没有毛毛果的,毛毛果都是长在树枝上的。但是这棵“毛景树”有着神奇的魔力,他能改变树枝上毛毛果的个数: Change k w:将第k条树枝上毛毛果的个数改变为w个。 Cover u v w:将节点u与节点v之间的树枝上毛毛果原创 2020-07-01 17:02:28 · 264 阅读 · 0 评论 -
The 2019 ICPC Asia Shanghai Regional Contest F.A Simple Problem On A Tree (线段树&树链剖分)
题目描述We have met so many problems on the tree, so today we will have a simple problem on a tree.You are given a tree (an acyclic undirected connected graph) with N\mathbf{N}N nodes. The tree nodes are numbered from 1\mathbf{1}1 to N\mathbf{N}N. Each n...原创 2020-07-05 16:22:03 · 289 阅读 · 0 评论