
数据结构_树链剖分
SCUT_Pein
这个作者很懒,什么都没留下…
展开
-
SPOJ375--Query on a tree(树链剖分)
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:CHANGE i ti : chang原创 2014-03-19 18:32:25 · 698 阅读 · 0 评论 -
大视野1036--树的统计Count(树链剖分)
Description一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式来要求你对这棵树完成一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节点的最大权值 III. QSUM u v: 询问从点u到点v的路径上的节点的权值和 注意:从点u到点v的路径上的节点包括u和v本身Inp原创 2014-07-17 14:44:20 · 611 阅读 · 0 评论 -
HDU5029--Relief grain(树链剖分)
Problem DescriptionThe soil is cracking up because of the drought and the rabbit kingdom is facing a serious famine. The RRC(Rabbit Red Cross) organizes the distribution of relief grain in the disas原创 2014-09-23 17:58:26 · 1393 阅读 · 0 评论 -
HDU5044--Tree(树链剖分)
Problem DescriptionYou are given a tree (an acyclic undirected connected graph) with N nodes. The tree nodes are numbered from 1 to NThere are N - 1 edges numbered from 1 to N - 1.Each nod原创 2014-09-27 18:38:59 · 999 阅读 · 0 评论 -
SPOJ2666--Query On a Tree Ⅳ
You are given a tree (an acyclic undirected connected graph) with N nodes, and nodes numbered 1,2,3...,N. Each edge has an integer value assigned to it(note that the value can be negative). Each node原创 2014-07-16 18:47:43 · 861 阅读 · 0 评论