随笔分类 -  动态规划

防御导弹
摘要:1151: 防御导弹Time Limit: 1 SecMemory Limit: 128 MBSubmit: 292Solved: 43Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统。但是这种导弹拦截 系统有一个缺陷:虽然它的第一发炮弹能够达到任意的高度,但是以后每一发炮弹... 阅读全文

posted @ 2015-09-02 09:11 甜蜜蜜吖甜蜜蜜 阅读(99) 评论(0) 推荐(0)

POJ-2533-Longest Ordered Subsequence(LIS模板)
摘要:Description A numeric sequence of ai is ordered if a1 #include #include using namespace std;int main(){ int n,i,j,a[1005],d[1005]; while(scanf("... 阅读全文

posted @ 2015-07-16 17:00 甜蜜蜜吖甜蜜蜜 阅读(147) 评论(0) 推荐(0)

HDU-1331-Function Run Fun(动态规划3)
摘要:DescriptionWe all love recursion! Don't we?Consider a three-parameter recursive function w(a, b, c):if a 20 or b > 20 or c > 20, then w(a, b, c) retu... 阅读全文

posted @ 2015-07-15 14:29 甜蜜蜜吖甜蜜蜜 阅读(213) 评论(0) 推荐(0)

HDU-1159 Common Subsequence(动态规划2)
摘要:DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence... 阅读全文

posted @ 2015-07-15 11:08 甜蜜蜜吖甜蜜蜜 阅读(168) 评论(0) 推荐(0)

POJ-1163-The Triangle (动态规划1)
摘要:Description73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that calculates the highest sum of... 阅读全文

posted @ 2015-07-14 10:50 甜蜜蜜吖甜蜜蜜 阅读(159) 评论(0) 推荐(0)

导航