
树链剖分
文章平均质量分 82
RJ28
小学生
展开
-
Gym 100818B Tree of Almost Clean Money
题意:给你一棵树,每次一个操作,修改书上最多不超过1000个点的值,然后询问u到v路径上的权值和。 分析:树链剖分,后边单点修改区间查询可以用树状数组。 #include #include #include #include #include #include #include #include #define INF 0x3f3f3f3f #define MOD 100000原创 2016-08-27 20:30:41 · 577 阅读 · 0 评论 -
Spoj 375 QTREE(树链剖分)
Description You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3...N-1. We will ask you to perfrom some instructions of the following form:原创 2016-08-22 23:56:58 · 374 阅读 · 0 评论 -
Hdu-5893 List wants to travel(树链剖分)
Problem Description A boy named List who is perfect in English. Now he wants to travel and he is making a plan. But the cost of living in same citie always changes. Now he wants to know how many diff原创 2016-09-18 23:11:53 · 398 阅读 · 0 评论