上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 94 下一页

2013年4月29日

ZOJ 3735 Cake(区间DP,最优三角剖分)

摘要: 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4472开始做下区间DP的题目了。题解可以参照大牛博客:http://blog.csdn.net/woshi250hua/article/details/7824433这题很经典,主要是思路:两种写法写的,一种是DP,一种是记忆化搜索。DP一定要注意循环的顺序。代码一://============================================================================// Name : ZOJ.cp... 阅读全文

posted @ 2013-04-29 10:45 kuangbin 阅读(1234) 评论(0) 推荐(0) 编辑

2013年4月28日

POJ 2411 Mondriaan's Dream(压缩DP)

摘要: Mondriaan's DreamTime Limit:3000MSMemory Limit:65536KTotal Submissions:8974Accepted:5187DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, f 阅读全文

posted @ 2013-04-28 17:28 kuangbin 阅读(392) 评论(1) 推荐(0) 编辑

2013年4月26日

ZOJ 4257 Most Powerful (状态压缩DP)

摘要: Most PowerfulTime Limit:2 Seconds Memory Limit:65536 KBRecently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms collide, one of them disappears and a lot of power is produced. Researchers know the way every t 阅读全文

posted @ 2013-04-26 22:33 kuangbin 阅读(440) 评论(0) 推荐(0) 编辑

POJ 2288 Islands and Bridges (状态压缩DP)

摘要: Islands and BridgesTime Limit:4000MSMemory Limit:65536KTotal Submissions:7685Accepted:1968DescriptionGiven a map of islands and bridges that connect these islands, a Hamilton path, as we all know, is a path along the bridges such that it visits each island exactly once. On our map, there is also a p 阅读全文

posted @ 2013-04-26 16:07 kuangbin 阅读(489) 评论(0) 推荐(0) 编辑

POJ 1185 炮兵阵地 (状态压缩DP)

摘要: 炮兵阵地Time Limit:2000MSMemory Limit:65536KTotal Submissions:14519Accepted:5406Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网格表示它能够攻击到的区域:沿 阅读全文

posted @ 2013-04-26 12:42 kuangbin 阅读(489) 评论(0) 推荐(1) 编辑

POJ 3254 Corn Fields(状态压缩DP)

摘要: Corn FieldsTime Limit:2000MSMemory Limit:65536KTotal Submissions:4739Accepted:2506DescriptionFarmer John has purchased a lush new rectangular pasture composed ofMbyN(1 ≤M≤ 12; 1 ≤N≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of squares. Regrettably, some of the squ 阅读全文

posted @ 2013-04-26 11:16 kuangbin 阅读(377) 评论(0) 推荐(0) 编辑

2013年4月25日

HDU 3681 Prison Break(状态压缩DP+BFS+二分答案)

摘要: Prison BreakTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2178Accepted Submission(s): 533Problem DescriptionRompire is a robot kingdom and a lot of robots live there peacefully. But one day, the king of Rompire was captured by human beings. His t 阅读全文

posted @ 2013-04-25 23:04 kuangbin 阅读(695) 评论(0) 推荐(0) 编辑

HDU 3001 Travelling (状态压缩DP)

摘要: TravellingTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2338Accepted Submission(s): 668Problem DescriptionAfter coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on 阅读全文

posted @ 2013-04-25 20:37 kuangbin 阅读(755) 评论(0) 推荐(0) 编辑

POJ 3294 Life Forms (后缀数组,求出现在不少于k个字符串的最长子串)

摘要: Life FormsTime Limit:5000MSMemory Limit:65536KTotal Submissions:7322Accepted:2011DescriptionYou may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, colour, wrinkles, ears, eyebrows and the like. A few bear no human resemblance; thes 阅读全文

posted @ 2013-04-25 16:57 kuangbin 阅读(728) 评论(0) 推荐(0) 编辑

POJ 3415 Common Substrings (后缀数组,长度不小于k的公共子串的个数)

摘要: Common SubstringsTime Limit:5000MSMemory Limit:65536KTotal Submissions:5495Accepted:1822DescriptionA substring of a stringTis defined as:T(i,k)=TiTi+1...Ti+k-1, 1≤i≤i+k-1≤|T|.Given two stringsA,Band one integerK, we defineS, a set of triples (i,j,k):S= {(i,j,k) |k≥K,A(i,k)=B(j,k)}.You are to give th 阅读全文

posted @ 2013-04-25 15:05 kuangbin 阅读(754) 评论(0) 推荐(1) 编辑

上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 94 下一页

导航

JAVASCRIPT: