
树形dp
junior19
abcde
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ2342:Anniversary party(树形dp)
Anniversary partyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7937 Accepted: 4549DescriptionThere is going to be a party to celebrate the 80-th Ann原创 2017-03-21 15:12:13 · 220 阅读 · 0 评论 -
CF618D:Hamiltonian Spanning Tree(贪心 & 树形dp & 最小路径覆盖)
D. Hamiltonian Spanning Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA group of n cities is connected by a network of roads. There is an un...原创 2018-03-11 16:37:04 · 441 阅读 · 0 评论 -
BZOJ1063:道路设计(树形dp)
1063: [Noi2008]道路设计Time Limit: 20 Sec Memory Limit: 162 MBSubmit: 1147 Solved: 619[Submit][Status][Discuss]Description Z国坐落于遥远而又神奇的东方半岛上,在小Z的统治时代公路成为这里主要的交通手段。Z国共有n座城市,一些城市之间由双向的公路所连接原创 2017-12-05 14:45:24 · 269 阅读 · 0 评论 -
BZOJ3566:概率充电器(树形dp & 概率dp)
3566: [SHOI2014]概率充电器Time Limit: 40 Sec Memory Limit: 256 MBSubmit: 1388 Solved: 603[Submit][Status][Discuss]Description著名的电子产品品牌 SHOI 刚刚发布了引领世界潮流的下一代电子产品——概率充电器:“采用全新纳米级加工技术,实现元件与导线能否原创 2017-12-04 20:30:54 · 249 阅读 · 0 评论 -
HDU沈阳网络赛:transaction transaction transaction(树形dp & 最短路)
transaction transaction transactionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 2245 Accepted Submission(s): 682Problem Desc原创 2017-09-11 11:16:02 · 256 阅读 · 0 评论 -
CF766E:Mahmoud and a xor trip(树形dp)
E. Mahmoud and a xor triptime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMahmoud and Ehab live in a countr原创 2017-07-28 18:01:38 · 409 阅读 · 0 评论 -
CodeChef:Sereja and Tree 2(树形dp)
Sereja has a rooted tree of N nodes with node 1 being the root node. He wants to find the number of ways of assigning an integer in the range [1, M] to each node, such that value of each node should原创 2017-08-20 13:11:02 · 295 阅读 · 0 评论 -
CodeChef:Company and Club Hierarchies(树形dp & 技巧)
题意:一棵树,每个节点有个权值k[i]和颜色c[i],定义以节点u为根节点的序列为“好的序列”条件是:能够找到一条有序链,该链以u节点开始,链的长度为k[i]+1,链的成员颜色均为c[i],对于链上第j个元素,j-1和j+1个元素必须是其祖先和子孙,问对每个节点求出它的好的序列数。思路:官方题解 树形dp,dp[i][j]为i颜色j长度的链数,ans[u]为u节点的好序列数,那么ans[u]原创 2017-08-16 17:30:43 · 307 阅读 · 0 评论 -
CF771C:Bear and Tree Jumps(树形dp & 树上距离和)
C. Bear and Tree Jumpstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tree is an undirected connected gr原创 2017-08-02 16:03:27 · 1015 阅读 · 1 评论 -
CF708C:Centroids(树形dp & 重心构造判断)
C. Centroidstime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputTree is a connected acyclic graph. Suppose you原创 2017-08-01 23:17:18 · 785 阅读 · 1 评论 -
HDU5293:Tree chain problem(树形dp & LCA)
Tree chain problemTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1779 Accepted Submission(s): 577Problem DescriptionCoco has原创 2017-07-31 19:40:34 · 272 阅读 · 0 评论 -
HDU1561:The more, The Better(树形dp & 01背包)
The more, The BetterTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8177 Accepted Submission(s): 4784Problem DescriptionACboy原创 2017-05-30 17:16:22 · 427 阅读 · 0 评论 -
HAOI2010:软件安装(强连通 + 树形dp)
题目描述现在我们的手头有N个软件,对于一个软件i,它要占用Wi的磁盘空间,它的价值为Vi。我们希望从中选择一些软件安装到一台磁盘容量为M计算机上,使得这些软件的价值尽可能大(即Vi的和最大)。但是现在有个问题:软件之间存在依赖关系,即软件i只有在安装了软件j(包括软件j的直接或间接依赖)的情况下才能正确工作(软件i依赖软件j)。幸运的是,一个软件最多依赖另外一个软件。如果一个软件不能正常工...原创 2018-07-16 22:24:25 · 361 阅读 · 0 评论