DP
Chook_lxk
你前程有在,但须澄心猛省,不可自甘堕落。
展开
-
HDU - 2571 命运(简单DP)
点击打开题目链接命运Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 20253Accepted Submission(s): 7055Problem Description穿过幽谷意味着离原创 2017-08-16 16:47:29 · 541 阅读 · 0 评论 -
UVALive - 7544 Banking II(dp)
点击打开题目链接A month ago at the South Pacific Divisional Contest, each of you (or one of your teammates) solved a problem about authenticating users. To refresh your memory: The Actuarial Commerce Merchant原创 2017-12-04 17:29:05 · 478 阅读 · 0 评论 -
51Nod - 1021 石子归并(经典dp)
点击打开题目链接基准时间限制:1秒 空间限制:131072KB 分值:20难度:3级算法题收藏关注N堆石子摆成一条线。现要将石子有次序地合并成一堆。规定每次只能选相邻的2堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的代价。计算将N堆石子合并成一堆的最小代价。例如: 1 2 3 4,有不少合并方法原创 2017-12-01 16:34:17 · 511 阅读 · 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)Total Submission(s): 40697Accepted Submission(s): 18831原创 2017-08-15 10:46:53 · 488 阅读 · 0 评论 -
HDU - 1505 City Game(最大子矩阵)
点击打开题目链接City GameTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7541Accepted Submission(s): 3262Problem DescriptionBo原创 2017-08-14 19:43:45 · 547 阅读 · 0 评论 -
HDU - 1506 Largest Rectangle in a Histogram(最大子矩阵)
点击打开题目链接Largest Rectangle in a HistogramTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19253Accepted Submission(s): 5803P原创 2017-08-14 16:26:12 · 554 阅读 · 0 评论 -
HDU - 1231 最大连续子序列
点击打开题目链接最大连续子序列Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 34209Accepted Submission(s): 15503Problem Description给定原创 2017-08-14 15:38:40 · 404 阅读 · 0 评论 -
HDU - 1176 免费馅饼(DP数塔)
点击打开题目链接免费馅饼Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 52321Accepted Submission(s): 18334Problem Description都说天上不原创 2017-08-19 20:27:50 · 518 阅读 · 0 评论 -
UVA - 1025 A Spy in the Metro (DP)
点击打开题目链接DescriptionSecret agent Maria was sent to Algorithms City to carry out an especially dangerous mission. After several thrilling events we find her in the first station of Algorithm原创 2017-08-17 20:04:33 · 290 阅读 · 0 评论 -
HDU - Monkey and Banana (最大递增子段和)
点击打开题目链接Monkey and BananaTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16178Accepted Submission(s): 8606Problem Descript原创 2017-08-17 10:32:28 · 248 阅读 · 0 评论 -
CodeForces - 1005D Polycarp and Div 3(dp||贪心)
点击打开题目链接 题目大意: 给出一个数字,将数字进行拆分成多个部分,使得其中有n个部分各位数字之和能被3整除,求解最大值n。 贪心思路: 对每位数字对3求余,则结果只能是0、1、2.如果当前位是0,则对结果贡献为1,如果不为0,则判断连续出现2或者1的数目num,如果num%3为0,则对结果的贡献为num/3,否则可以找到一个与当前数字不相等的数字(前面连续出现的是2,当前为1。或者前面...原创 2018-07-16 20:52:02 · 336 阅读 · 0 评论