代码改变世界

随笔分类 -  ACM_ 动态规划

poj1270 拓扑排序 (好久没写过这么详细的博客了^o^)

2012-05-27 10:27 by java环境变量, 326 阅读, 收藏,
摘要: Following OrdersTime Limit:1000MSMemory Limit:10000KTotal Submissions:2504Accepted:940DescriptionOrder is an important concept in mathematics and in computer science. For example, Zorn's Lemma states: ``a partially ordered set in which every chain has an upper bound contains a maximal element.&# 阅读全文

poj 1088 滑雪-----DP 动态规划

2012-05-16 17:29 by java环境变量, 332 阅读, 收藏,
摘要: 滑雪Time Limit:1000MSMemory Limit:65536KTotal Submissions:57209Accepted:20771DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9一个人可以从某个... 阅读全文

poj 1125 Stockbroker Grapevine ----Floyd算法,有向图

2012-05-16 12:07 by java环境变量, 224 阅读, 收藏,
摘要: Stockbroker GrapevineTime Limit:1000MSMemory Limit:10000KTotal Submissions:19896Accepted:10744DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the st 阅读全文

hdu 1003 Max Sum----动态规划

2012-02-04 01:02 by java环境变量, 253 阅读, 收藏,
摘要: Max SumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 66583Accepted Submission(s): 15239Problem DescriptionGiven 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 阅读全文