
Dynamic Programming
文章平均质量分 79
Southan97
本科计算机科学与技术专业,现软件工程专业在读研究生
展开
-
HDU_1260 Tickets
HDU 1260 Tickets 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 back home as early as possible.A good approach, reducing th原创 2017-01-18 11:15:30 · 395 阅读 · 0 评论 -
HDU_1069 Monkey and Banana
HDU 1069 Monkey and Banana A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monkey is clever enough, it shall原创 2017-01-17 22:20:50 · 597 阅读 · 0 评论 -
HDU_1087 Super Jumping! Jumping! Jumping!
HDU 1087 Super Jumping! Jumping! Jumping! Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now.原创 2017-01-17 17:36:03 · 381 阅读 · 0 评论 -
HDU_1257 最少拦截系统
HDU 1257 最少拦截系统 某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.原创 2017-01-17 17:16:20 · 441 阅读 · 1 评论 -
COJ_2040_成群的触手(双向dp)
I. 成群的触手Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: lldJava class name: MainSubmitStatusPID: 2040饭团学长终于成功的约了漂亮的大姐姐,但是漂亮大姐姐来约会的路上要经过一片沼泽地,原创 2017-01-16 23:15:13 · 1131 阅读 · 0 评论 -
POJ_2411_Mondriaan's Dream
Mondriaan's DreamTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 15097 Accepted: 8710DescriptionSquares and rectangles fascinated the famous Dutch painter原创 2016-07-31 19:29:09 · 454 阅读 · 1 评论 -
HDU 5389 Zero Escape
Zero EscapeProblem DescriptionZero Escape, is a visual novel adventure video game directed by Kotaro Uchikoshi (you may hear about ever17?) and developed by Chunsoft.Stilwell is enjoying原创 2017-04-06 21:08:57 · 332 阅读 · 0 评论 -
两种方法求LCS(最长公共子序列)
两种方法求LCS(最长公共子序列) 求LCS长度,打印输出一个LCS。 二维数组和滚动数组的动态规划。原创 2017-07-04 21:17:15 · 802 阅读 · 0 评论 -
HDU 5155 dp
dp[i][j]: 前 i 行 满足每一行都有 1 且满足有 j 列有1,考虑第i行的放置情况状态转移: dp[0][0] = 1LL; for(int i = 1; i <= n; ++i) { for(int j = 1; j <= m; ++j) { for(int k = 0; k <= m; ++k) { if(dp[i原创 2017-08-26 16:30:12 · 387 阅读 · 0 评论