
树链剖分
life4711
这个作者很懒,什么都没留下…
展开
-
spoj375 树链剖分(单点更新,区间查询)
http://www.spoj.com/problems/QTREE/QTREE - Query on a treeno tags You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3...N-1.We w原创 2015-05-27 10:17:39 · 957 阅读 · 0 评论 -
hdu 5242 树链剖分找权值最大的前k条链
http://acm.hdu.edu.cn/showproblem.php?pid=5242Problem DescriptionIt is well known that Keima Katsuragi is The Capturing God because of his exceptional skills and experience in ''capturing''原创 2015-06-01 09:02:30 · 1639 阅读 · 0 评论 -
HYSBZ 2243 树链剖分(区间更新,区间查询)较难
http://www.lydsy.com/JudgeOnline/problem.php?id=2243Description给定一棵有n个节点的无根树和m个操作,操作有2类:1、将节点a到节点b路径上所有点都染成颜色c;2、询问节点a到节点b路径上的颜色段数量(连续相同颜色被认为是同一段),如“112221”由3段组成:“11”、“222”和“1”。原创 2015-05-30 08:35:39 · 1206 阅读 · 3 评论 -
poj 3237 树链剖分(区间更新,区间查询)
http://poj.org/problem?id=3237DescriptionYou are given a tree with N nodes. The tree’s nodes are numbered 1 through N and its edges are numbered 1 through N − 1. Each edge is associated with a原创 2015-05-29 16:25:04 · 1380 阅读 · 0 评论 -
light oj 1348 树链剖分(单点更新区间求值)
http://lightoj.com/volume_showproblem.php?problem=1348Finally the Great Magical Lamp was in Aladdin's hand. Now he wanted to return home. But he didn't want to take any help from the Genie because原创 2015-05-29 14:19:15 · 1110 阅读 · 0 评论 -
HYSBZ 1036 树链剖分(单点更新区间求和求最大值)
http://www.lydsy.com/JudgeOnline/problem.php?id=1036Description一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式来要求你对这棵树完成一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节点的最大权值 III. QSUM u原创 2015-05-29 13:14:05 · 1026 阅读 · 0 评论 -
FZU2082 树链剖分(单点更新区间求值)
http://acm.fzu.edu.cn/problem.php?pid=2082 Problem Description有n座城市,由n-1条路相连通,使得任意两座城市之间可达。每条路有过路费,要交过路费才能通过。每条路的过路费经常会更新,现问你,当前情况下,从城市a到城市b最少要花多少过路费。 Input有多组样例,每组样例第一行输入两个正整数n,m(2原创 2015-05-29 13:08:36 · 842 阅读 · 0 评论 -
poj 2763 树链剖分(单点更新,区间求值)
http://poj.org/problem?id=2763DescriptionAfter their royal wedding, Jiajia and Wind hid away in XX Village, to enjoy their ordinary happy life. People in XX Village lived in beautiful huts. Th原创 2015-05-28 20:19:35 · 799 阅读 · 0 评论 -
hdu3966 树链剖分(区间更新和单点求值)
http://acm.hdu.edu.cn/showproblem.php?pid=3966Problem DescriptionOur protagonist is the handsome human prince Aragorn comes from The Lord of the Rings. One day Aragorn finds a lot of enemies原创 2015-05-28 10:30:28 · 1705 阅读 · 0 评论 -
hihocoder 1232 || 2015北京网络赛F题 树连剖分
http://hihocoder.com/problemset/problem/1232描述"Couple Trees" are two trees, a husband tree and a wife tree. They are named because they look like a couple leaning on each other. They share a原创 2015-09-21 15:37:52 · 1309 阅读 · 0 评论