左儿子右兄弟的树形DP?我靠,多大的代码复杂度啊?快来写一发分组背包版树形DP!!!【POJ1947】将你导入这个即将被背包占领的世界!...
分类:
其他好文 时间:
2014-09-25 12:43:39
阅读次数:
175
最小生成树问题,已经修好路的村庄之间将他们的长度置为0,然后再用Kruskal算法求解。...
分类:
其他好文 时间:
2014-09-19 23:57:36
阅读次数:
424
1123: [POI2008]BLOTime Limit: 10 SecMemory Limit: 162 MBSubmit: 614Solved: 235[Submit][Status]DescriptionByteotia城市有n个 towns m条双向roads. 每条 road 连接 两个不...
分类:
其他好文 时间:
2014-09-16 20:25:51
阅读次数:
231
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 10 using namespace std; 11 12 typedef pa...
分类:
其他好文 时间:
2014-09-13 02:59:14
阅读次数:
210
1116: [POI2008]CLOTime Limit: 10 SecMemory Limit: 162 MBSubmit: 565Solved: 303[Submit][Status]DescriptionByteotia城市有n个 towns m条双向roads. 每条 road 连接 两个不...
分类:
其他好文 时间:
2014-09-11 16:57:42
阅读次数:
331
题目来源:http://poj.org/problem?id=3411
Paid Roads
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 5383
Accepted: 1923
Description
A network of m ro...
分类:
其他好文 时间:
2014-09-10 17:47:00
阅读次数:
220
这题 一定要好好读题啊 不能走马观花...Mirko overheard in the car that one of the roads is under repairs, and that it is blocked, but didn't konw exactly which road---有...
分类:
其他好文 时间:
2014-09-09 11:58:18
阅读次数:
256
PAT 1087 All Roads Lead to Rome题目:Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the rout...
分类:
其他好文 时间:
2014-09-07 10:59:14
阅读次数:
198
题目链接题意 : 给你一棵树,问你至少断掉几条边能够得到有p个点的子树。思路 : dp[i][j]代表的是以i为根的子树有j个节点。dp[u][i] =dp[u][j]+dp[son][i-j]-1,son是u的儿子节点。初始是将所有的儿子都断开,然后-1代表的是这个儿子我需要了,不断了。 1 #i...
分类:
其他好文 时间:
2014-09-04 18:57:39
阅读次数:
133