
动态规划
文章平均质量分 81
七月初七小柠七
人生在世,事业为重。
一息尚存,绝不松劲!
展开
-
Trie树
6902: Trie树时间限制: 1 Sec 内存限制: 128 MB提交: 184 解决: 41[提交] [状态] [讨论版] [命题人:admin]题目描述字母(Trie)树是一个表示一个字符串集合中所有字符串的前缀的数据结构,其有如下特征:1.树的每一条边表示字母表中的一个字母2.树根表示一个空的前缀3.树上所有其他的节点都表示一个非空前缀,每一个节点表示的前缀为树...原创 2018-07-31 20:58:32 · 328 阅读 · 0 评论 -
抄近路
贵有恒,何必三更起五更眠;最无益,莫过一日曝十日寒。2264: 【动态规划】抄近路时间限制: 1 Sec 内存限制: 64 MB提交: 63 解决: 43[提交][状态][讨论版][命题人:admin]题目描述“最近不知道怎么回事,感觉我们这个城市变成了一个神奇的地方,有时在路上走着走着人就消失了!走着走着突然又有人出现了!你以为这是《寂静岭》,《生化危机》,《行尸走肉》拍摄地?……哎,先不说...原创 2018-05-29 19:24:42 · 854 阅读 · 0 评论 -
skiing
问题 B: 【动态规划】skiing时间限制: 1 Sec 内存限制: 128 MB提交: 157 解决: 83[提交][状态][讨论版][命题人:外部导入]题目描述Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个 区域中最长底滑坡。区域由一个二维数组给出。数...原创 2018-05-23 19:39:23 · 227 阅读 · 0 评论 -
Common Subsequence (最长公共子序列裸题)
Common SubsequenceProblem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subse原创 2018-01-28 16:43:25 · 443 阅读 · 0 评论 -
拦截导弹(最长上升子序列,最长不上升子序列)
拦截导弹 NOIP 1999【题目描述】张琪曼:“老师,修罗场是什么?”墨老师:“修罗是佛家用语,修罗毕生以战斗为目标,修罗场指的是他们之间的死斗坑,人们通常用‘修罗场’来形容惨烈的战场。后来又引申出‘一个人在困境中做绝死奋斗’的意思。所以,这其实也在暗示我们,即使是身处绝境,也不要放弃奋斗。再说了,情况其实没有这么糟糕,因为我们最新的导弹拦截系统已经研制好了。”魔法世界为了防御修罗王军团的导弹袭...原创 2018-03-12 16:33:49 · 432 阅读 · 0 评论 -
Super Jumping! Jumping! Jumping! (最长上升子序列的和)
Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 896 Accepted Submission(s): 518 P原创 2018-01-30 10:08:37 · 225 阅读 · 0 评论 -
免费馅饼 (数塔)
Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个原创 2018-01-30 08:48:53 · 304 阅读 · 0 评论 -
Piggy-Bank(完全背包)
Piggy-BankTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2940 Accepted Submission(s): 1452Problem DescriptionBefore ACM ca原创 2018-01-29 17:16:37 · 256 阅读 · 0 评论 -
Palindrome
PalindromeTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 46005 Accepted: 15688DescriptionA palindrome is a symmetrical string, th原创 2018-01-29 15:45:22 · 552 阅读 · 0 评论 -
Advanced Fruits (最长公共子序列+回溯)
Problem DescriptionThe company "21st Century Fruits" has specialized in creating new sorts of fruits by transferring genes from one fruit into the genome of another one. Most times this method doesn原创 2018-01-29 15:07:08 · 442 阅读 · 0 评论 -
Milking Time(简单DP)
Milking TimeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5290 Accepted: 2183DescriptionBessie is such a hard-working cow. In fact, she is so focused原创 2018-01-29 10:36:32 · 318 阅读 · 0 评论 -
Dream City
Dream CityTime Limit: 1 Second Memory Limit: 32768 KBJAVAMAN is visiting Dream City and he sees a yard of gold coin trees. There are n trees in the yard. Let's call them tree 1, tree 2 ..原创 2018-02-02 09:03:41 · 491 阅读 · 0 评论 -
Mahmoud and a Message
C. Mahmoud and a Messagetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMahmoud wrote a message s of length n. H原创 2018-01-24 17:14:13 · 260 阅读 · 0 评论 -
Tickets(DP)
Problem Description Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go原创 2018-01-31 15:32:02 · 303 阅读 · 0 评论 -
0-1背包内循环逆序讲解
首先 什么是01背包问题?(可以参考下百度百科 只是我觉得百度百科对于为什么逆序这个问题解释的不是特别清楚)(以下题目中的内容摘自百度百科)/////////////////////////////////////////////////////////////////////////////////////题目有N件物品和一个容量为V的背包。第i件物品的重量是c[i],价值是w[转载 2017-11-18 15:38:08 · 1084 阅读 · 0 评论 -
Piggy-Bank(完全背包)
Problem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The原创 2017-11-18 15:35:37 · 420 阅读 · 0 评论 -
Bichrome Tree (树形dp)
6611: Bichrome Tree时间限制: 1 Sec 内存限制: 128 MB提交: 154 解决: 41[提交] [状态] [讨论版] [命题人:admin]题目描述We have a tree with N vertices. Vertex 1 is the root of the tree, and the parent of Vertex i (2≤i≤N) i...原创 2018-08-02 09:07:00 · 419 阅读 · 0 评论