数据结构_树链剖分
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 · 689 阅读 · 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 · 601 阅读 · 0 评论 -
HDU5029--Relief grain(树链剖分)
Problem Description The 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 · 1374 阅读 · 0 评论 -
HDU5044--Tree(树链剖分)
Problem Description You are given a tree (an acyclic undirected connected graph) with N nodes. The tree nodes are numbered from 1 to N There are N - 1 edges numbered from 1 to N - 1. Each nod原创 2014-09-27 18:38:59 · 977 阅读 · 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 · 842 阅读 · 0 评论