I am a slow walker,but I never walk backwards. Abraham Lincoln

GeekZRF

随笔分类 -  动态规划————

POJ 2152.Fire 树形dp
摘要:Fire Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 1616 Accepted: 878 Description Country Z has N cities, which are numbered from 1 to N. 阅读全文

posted @ 2017-10-06 15:58 GeekZRF 阅读(190) 评论(0) 推荐(0)

POJ 3162.Walking Race 树形dp 树的直径
摘要:Walking Race Time Limit: 10000MS Memory Limit: 131072K Total Submissions: 4123 Accepted: 1029 Case Time Limit: 3000MS Description flymouse’s sister wc 阅读全文

posted @ 2017-10-02 15:39 GeekZRF 阅读(289) 评论(0) 推荐(0)

HDU 3586.Information Disturbing 树形dp 叶子和根不联通的最小代价
摘要:Information Disturbing Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 3205 Accepted Submission( 阅读全文

posted @ 2017-09-30 17:08 GeekZRF 阅读(221) 评论(0) 推荐(0)

POJ 3140.Contestants Division 基础树形dp
摘要:Contestants Division Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 10704 Accepted: 3004 Description In the new ACM-ICPC Regional Contest, 阅读全文

posted @ 2017-09-29 15:46 GeekZRF 阅读(202) 评论(0) 推荐(0)

POJ 2378.Tree Cutting 树形dp 树的重心
摘要:Tree Cutting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4834 Accepted: 2958 Description After Farmer John realized that Bessie had ins 阅读全文

posted @ 2017-09-29 14:17 GeekZRF 阅读(186) 评论(0) 推荐(0)

HDU 2196.Computer 树形dp 树的直径
摘要:Computer Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 31049 Accepted Submission(s): 3929 Probl 阅读全文

posted @ 2017-09-29 13:48 GeekZRF 阅读(248) 评论(0) 推荐(0)

HDU 1520.Anniversary party 基础的树形dp
摘要:Anniversary party Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12770 Accepted Submission(s): 5 阅读全文

posted @ 2017-09-28 22:48 GeekZRF 阅读(259) 评论(0) 推荐(0)

POJ 1741.Tree 树分治 树形dp 树上点对
摘要:Tree Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 24258 Accepted: 8062 Description Give a tree with n vertices,each edge has a length(po 阅读全文

posted @ 2017-09-21 16:51 GeekZRF 阅读(155) 评论(0) 推荐(0)

POJ 3107.Godfather 树形dp
摘要:Godfather Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7536 Accepted: 2659 Description Last years Chicago was full of gangster fights an 阅读全文

posted @ 2017-09-20 18:32 GeekZRF 阅读(158) 评论(0) 推荐(0)

POJ 1655.Balancing Act 树形dp 树的重心
摘要:Balancing Act Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14550 Accepted: 6173 Description Consider a tree T with N (1 <= N <= 20,000) 阅读全文

posted @ 2017-09-19 22:09 GeekZRF 阅读(162) 评论(0) 推荐(0)

n的m划分 整数拆分问题
摘要:n的m划分 将n划分成若干个不超过m的数(正整数)的和,问有几种划分情况。 现在根据n和m的关系,考虑下面几种情况: 综上的递推表达式为: 将n划分成不超过m个数(正整数)的和,问有几种情况。 dp[i][j]表示j的i划分。 考虑n的m划分,如果对于每一个i都有xi>0,那么{xi-1}就对应了n 阅读全文

posted @ 2017-07-06 20:46 GeekZRF 阅读(995) 评论(0) 推荐(0)

UVA 11324.The Largest Clique tarjan缩点+拓扑dp
摘要:题目链接:https://vjudge.net/problem/UVA-11324 题意:求一个有向图中结点数最大的结点集,使得该结点集中任意两个结点u和v满足:要目u可以到达v,要么v可以到达u(相互可达也可以)。 思路:同一个强联通分量的结点集中任意两个结点u和v满足题的要求足:要么u可以到达v 阅读全文

posted @ 2017-03-23 20:45 GeekZRF 阅读(176) 评论(0) 推荐(0)

Codeforces 677C. Coloring Trees dp
摘要:C. Coloring Trees time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output ZS the Coder and Chris 阅读全文

posted @ 2016-09-08 20:46 GeekZRF 阅读(442) 评论(0) 推荐(0)

Codeforces 607A 动态规划
摘要:A. Chain Reaction time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Chain Reaction time 阅读全文

posted @ 2016-01-15 14:24 GeekZRF 阅读(331) 评论(0) 推荐(0)

Codeforces 611C. New Year and Domino 动态规划
摘要:C. New Year and Domino time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output They say "years a 阅读全文

posted @ 2016-01-03 20:19 GeekZRF 阅读(343) 评论(0) 推荐(0)

导航