
LCA
文章平均质量分 82
_rabbit
这个作者很懒,什么都没留下…
展开
-
HDU 4547 倍增LCA
CD操作Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 799 Accepted Submission(s): 224Problem Description 在Windows下我们可以通过cmd运行DOS的原创 2013-11-20 23:45:01 · 983 阅读 · 0 评论 -
倍增lca模板
看cf代码,看到别人写得那么简洁,学习了。#include #include #include #include #include #include #include #include #include #include #include #include using namespace std;const int maxn=200020;int head[maxn原创 2014-01-10 18:28:12 · 880 阅读 · 0 评论 -
lca倍增dp
题目链接:题目题意:在一个树上,选取两个点,是他们的差值最大,不过较大值应该在较小值路径的前面。解题思路:倍增lca,然后采用倍增维护信息,第一次学倍增dp。代码:/* ***********************************************Author :xianxingwuguanCreated Time :2014/1/16 20:42:49F原创 2014-01-16 23:04:21 · 1360 阅读 · 0 评论 -
hdu 2586 lca模板题
How far away ?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4106 Accepted Submission(s): 1567Problem DescriptionThere are n hou原创 2014-03-29 11:58:06 · 1833 阅读 · 0 评论 -
POJ 3417 lca+树形dp
NetworkTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 3749 Accepted: 1067DescriptionYixght is a manager of the company called SzqNetwork(SN). Now she原创 2014-03-30 13:50:15 · 1014 阅读 · 0 评论 -
HDU 3896 dfs树倍增
Greatest TCTime Limit: 12000/4000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 509 Accepted Submission(s): 148Problem DescriptionTC (Tian Chao) is m原创 2014-05-02 22:34:25 · 998 阅读 · 0 评论 -
SPOJ Count on a tree 树上第k大。
DescriptionYou are given a tree with N nodes.The tree nodes are numbered from1 to N.Each node has an integer weight.We will ask you to perform the following operation:u v k : ask for the k原创 2014-04-11 19:20:59 · 1022 阅读 · 0 评论 -
HDU 4912 lca贪心
Paths on the treeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 297 Accepted Submission(s): 93Problem Descriptionbobo has a tr原创 2014-08-06 11:45:00 · 1252 阅读 · 0 评论