![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM之DP专题
punchline_skr
会飞的代码
展开
-
游船费问题
问题描述 某旅游城市在长江边开辟了若干个游船出租站,游客可在这些游船出租站租用游船,并在下游的任何一个游船出租站归还游船,从一个游船出租站到下游的游船出租站间的租金明码标价。你的任务是为游客计算从起点站到终点站间的最少租船费用。输入 输入有若干组测试数据,每组测试数据的第一行上有一个整数n,(1≤n≤100),表示上游的起点站0到下游有n个游船出租站1,2,…,n。接下来有n行...转载 2018-04-18 22:40:21 · 750 阅读 · 0 评论 -
C-勤奋的杨老师 (dp应用+二分)
时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述 杨老师认为他的学习能力曲线是一个拱形。勤奋的他根据时间的先后顺序罗列了一个学习清单,共有n个知识点。但是清单中的知识并不是一定要学习的,可以在不改变先后顺序的情况下有选择的进行学习,而每一个知识点都对应一个难度值。杨老师希望,后学习的知识点...原创 2018-05-03 14:45:58 · 273 阅读 · 0 评论 -
D-psd面试 (dp+LCS)
时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述 掌握未来命运的女神 psd 师兄在拿了朝田诗乃的 buff 后决定去实习。埃森哲公司注册成立于爱尔兰,是一家全球领先的专业服务公司,为客户提供战略、咨询、数字、技术和运营服务及解决方案。他们立足商业与技术的前沿,业务涵盖40多个行业,以...原创 2018-03-25 14:36:51 · 252 阅读 · 0 评论 -
Common Subsequence(hdu 1159) (简单dp+LCS)
Common SubsequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 48592 Accepted Submission(s): 22343Problem DescriptionA subsequence ...原创 2018-05-11 23:52:14 · 287 阅读 · 0 评论 -
LITTLE SHOP OF FLOWERS(POJ 1157) (dp方程)
Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 22648 Accepted: 10463 You want to arrange the window of your flower shop in a most pleasant way. You have F bunches of fl...原创 2018-07-31 13:22:41 · 152 阅读 · 0 评论 -
种草莓 (dp方程)
1714: 种草莓时间限制: 5 Sec 内存限制: 128 MB提交: 245 解决: 50[提交][状态][讨论版]题目描述小美有一块N*N的正方形菜地,寒暑交替,冬去春来,现在到了可以种植草莓的季节了。遗憾的是,有些格子已经种上别的蔬菜了。小美希望在菜地中找到最大的一块正方形空地来种草莓,以满足她大吃草莓的愿望。输入第一行是一个整数T(1<=T<=10...原创 2018-07-30 22:42:49 · 928 阅读 · 0 评论 -
B. Working out(cf) (dp方程+技巧)
B. Working outtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSummer is coming! It's time for Iahub and Iahubina to work out, as...转载 2018-07-29 11:02:12 · 654 阅读 · 1 评论 -
最长上升子序列 (简单dp+二分)
A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence ( a1, a2, ..., aN) be any sequence ( ai1, ai2, ..., aiK), where 1 <= i1 < i2...原创 2018-07-25 16:15:21 · 146 阅读 · 0 评论 -
最大连续和 (基础dp)
Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 14. InputThe...原创 2018-07-25 09:23:22 · 285 阅读 · 0 评论 -
B - Backfront(atcoder) (dp应用+找规律)
B - BackfrontTime limit : 2sec / Memory limit : 1024MBScore : 500 pointsProblem StatementYou are given a sequence (P1,P2,…,PN) which is a permutation of the integers from 1 through N. You woul...原创 2018-07-24 11:00:39 · 363 阅读 · 0 评论 -
C - Strange Bank(atcoder) (dp方程+硬币找零)
C - Strange BankTime Limit: 2 sec / Memory Limit: 256 MBScore : 300 pointsProblem StatementTo make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of t...原创 2018-06-10 21:49:46 · 358 阅读 · 0 评论 -
最长非递减子序列(dp+二分)
时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述 一只青蛙出去旅游,因为中国有一句古话说的好:“由简入奢易,由奢入俭难”,所以这只青蛙当看的当前景点比前面看过的景点差的时候,青蛙就会说“不开心”为了避免这只青蛙说“不开心”,并且使青蛙看的景点尽量的多,所以他请你帮忙给他安排一条线路,使...原创 2018-08-30 10:53:55 · 1390 阅读 · 0 评论