算法竞赛-动态规划
fzw_captain
hold on tight
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
算法竞赛入门经典 DAG上的动态规划
矩形嵌套 时间限制:3000 ms | 内存限制:65535 KB 难度:4 描述 有n个矩形,每个矩形可以用a,b来描述,表示长和宽。矩形X(a,b)可以嵌套在矩形Y(c,d)中当且仅当a 输入 第一行是一个正正数N(0 每组测试数据的第一行是一个正正数n,表示该组测试数据中含有矩形的个数(n 随后的n行,每行有两个数a,b(0 输出 每组测试数据都输出一个数,表示最原创 2015-06-18 19:30:24 · 522 阅读 · 0 评论 -
HDU 4612 Warm up 树的最长路径DP + 无向图带重边
Warm up Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Problem Description N planets are connected by M bidirectional channels that allow instant transporta原创 2015-08-19 11:33:40 · 413 阅读 · 0 评论 -
Uva1025 - A Spy in the Metro
Secret agent Maria was sent to Algorithms City to carry out an especiallydangerous mission. After several thrillingevents we find her in the first station of Algorithms City Metro, examining thetime t原创 2015-06-19 21:33:21 · 390 阅读 · 0 评论 -
HDU 1069 Monkey and Banana
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a原创 2015-08-10 18:23:17 · 288 阅读 · 0 评论 -
HDU1260 Tickets
Tickets Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1824 Accepted Submission(s): 883 Problem Description Jesus, what a great movie!原创 2015-08-12 11:26:58 · 278 阅读 · 0 评论 -
HDU 1114 Piggy-Bank (完全背包)
Piggy-Bank Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description Before ACM can do anything, a budget must be prepared and the necessary financial原创 2015-08-12 12:27:56 · 311 阅读 · 0 评论 -
HDU 1087 Super Jumping! Jumping! Jumping!
Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumpi原创 2015-08-12 12:43:13 · 255 阅读 · 0 评论 -
HDU1176 免费馅饼 树形DP
免费馅饼 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内原创 2015-08-12 12:13:01 · 275 阅读 · 0 评论 -
POJ 2533 Longest Ordered Subsequence
Longest Ordered Subsequence Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 39246 Accepted: 17258 Description A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subseq原创 2015-08-22 23:38:01 · 316 阅读 · 0 评论 -
UVa 437 --- The Tower of Babylon
Perhaps you have heard of the legend of the Tower of Babylon. Nowadays many details of this tale have been forgotten. So now, in line with the educational nature of this contest, we will tell you the原创 2015-06-21 12:06:07 · 370 阅读 · 0 评论 -
POJ3186:Treats for the Cows
Treats for the Cows Description FJ has purchased N (1 The treats are interesting for many reasons: The treats are numbered 1..N and stored sequentially in single file in a long box that is原创 2015-06-18 19:35:20 · 502 阅读 · 0 评论 -
DAG上的动态规划------硬币问题
题目:有n种硬币,面值分别为V1,V2,...Vn,每种都有无限多。给定非负整数S,可以选用多少个硬币,使得面值之和恰好为S?输出硬币数目的最小值和最大值! 分析:我们把每种面值看作一个点!表示“还需要凑足的面值”,初始状态为S,目标状态为0。那么若当前状态在i,每使用一个硬币j,状态便转移到i-Vj。 #include #include #define max(a,b) (a原创 2015-06-18 21:50:34 · 880 阅读 · 0 评论 -
HDU 1024 Max Sum Plus Plus最大m子段和
Max Sum Plus Plus Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a原创 2015-08-10 19:17:36 · 584 阅读 · 0 评论
分享