随笔分类 -  插头DP

[原创]插头DP小结(ACM by kuangbin)
摘要:这几天学习了一下插头DP,刷了11道题。对插头DP有了点理解。插头DP就先告一段落吧! 后面还有插头DP的广义路径和其它复杂应用,以后有机会再补上吧! kuangbin首先入门推荐的还是cdq的论文:《基于连通性状态压缩的动态规划问题》http://wenku.baidu.com/view/4fe4ac659b6648d7c1c74633.html上面的论文关于插头和轮廓线等概念讲得很清楚。而且关于插头DP的精髓也讲得很透了。插头DP其实就是每格进行状态转移。看懂原理和写代码还是有段距离的,可以结合代码去加深理解原理。同时形成适合自己风格的代码模板。HDU 1693 Eat the Trees 阅读全文

posted @ 2012-10-02 15:10 kuangbin 阅读(19922) 评论(1) 推荐(5)

HDU 4285 circuits 第37届ACM/ICPC天津赛区网络赛(插头DP)
摘要:circuitsTime Limit: 30000/15000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 418Accepted Submission(s): 141Problem Description Given a map of N * M (2 <= N, M <= 12) , '.' means empty, '*' means walls. You need to build K circuits and no circuit 阅读全文

posted @ 2012-10-02 13:51 kuangbin 阅读(1302) 评论(2) 推荐(0)

ZOJ 3213 Beautiful Meadow (插头DP 求简单路径)
摘要:Beautiful MeadowTime Limit: 5 Seconds Memory Limit: 32768 KBTom's MeadowTom has a meadow in his garden. He divides it into N * M squares. Initially all the squares are covered with grass and there may be some squares cannot be mowed.(Let's call them forbidden squares.) He wants to mow down t 阅读全文

posted @ 2012-10-02 01:31 kuangbin 阅读(1401) 评论(0) 推荐(0)

FZU 1977 Pandora adventure (插头DP)
摘要:Problem 1977 Pandora adventureAccept: 246Submit: 816Time Limit: 1000 mSecMemory Limit : 32768 KB Problem DescriptionThe pollution of the earth is so serious that people can not survive any more. Fortunately, people have found a new planet that maybe has life, and we call it "Pandora Planet" 阅读全文

posted @ 2012-10-01 22:28 kuangbin 阅读(1095) 评论(0) 推荐(0)

HDU 1693 Eat the Trees(插头DP,多条回路)
摘要:Eat the TreesTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1663Accepted Submission(s): 783Problem DescriptionMost of us know that in the game called DotA(Defense of the Ancient), Pudge is a strong hero in the first period of the game. When the ga 阅读全文

posted @ 2012-10-01 17:44 kuangbin 阅读(3217) 评论(3) 推荐(1)

ZOJ 3256 Tour in the Castle (插头DP求回路个数+矩阵乘法)
摘要:Tour in the CastleTime Limit: 5 Seconds Memory Limit: 32768 KBAfter the final BOSS is defeated, the hero found that the whole castle is collapsing (very familiar scene, isn't it). Escape from the castle is easy, just need to cross a few rooms. But as the Hero is full of adventurous spirit, he de 阅读全文

posted @ 2012-10-01 17:41 kuangbin 阅读(1284) 评论(0) 推荐(0)

HDU 3377 Plan (插头DP)
摘要:PlanTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 449Accepted Submission(s): 151Problem DescriptionOne day, Resty comes to an incredible world to seek Eve -- The origin of life. Lilith, the sister of Eve, comes with him. Although Resty wants to f 阅读全文

posted @ 2012-10-01 16:12 kuangbin 阅读(1194) 评论(0) 推荐(0)

HDU 1964 Pipes(插头DP)
摘要:PipesTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 301Accepted Submission(s): 154Problem DescriptionThe construction of office buildings has become a very standardized task. Pre-fabricated modules are combined according to the customer’s needs, s 阅读全文

posted @ 2012-09-30 20:59 kuangbin 阅读(1098) 评论(0) 推荐(0)

POJ 3133 Manhattan Wiring(插头DP)
摘要:Manhattan WiringTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 1112Accepted: 636DescriptionThere is a rectangular area containing n × m cells. Two cells are marked with “2”, and another two with “3”. Some cells are occupied by obstacles. You should connect the two “2”s and also the tw 阅读全文

posted @ 2012-09-30 16:28 kuangbin 阅读(1046) 评论(0) 推荐(0)

POJ 1739 Tony's Tour(插头DP)
摘要:Tony's TourTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 2648Accepted: 1197DescriptionA square township has been divided up into n*m(n rows and m columns) square plots (1<=N,M<=8),some of them are blocked, others are unblocked. The Farm is located in the lower left plot and the 阅读全文

posted @ 2012-09-30 10:39 kuangbin 阅读(1941) 评论(4) 推荐(0)

Ural 1519 Formula 1 (插头DP)
摘要:1519. Formula 1Time Limit: 1.0 secondMemory Limit: 16 MBBackgroundRegardless of the fact, that Vologda could not get rights to hold the Winter Olympic games of 20**, it is well-known, that the city will conduct one of the Formula 1 events. Surely, for such an important thing a new race circuit shoul 阅读全文

posted @ 2012-09-29 23:25 kuangbin 阅读(2849) 评论(0) 推荐(1)

ZOJ 3466 The Hive II (插头DP)
摘要:The Hive IITime Limit: 5 Seconds Memory Limit: 65536 KBThere is a hive in the village. Like this. There are 8 columns(from A to H) in this hive. Different colums have the same number of grids. Every grid has its own coordinate, which is formed by two uppercases, representing the row index and the c. 阅读全文

posted @ 2012-09-29 21:01 kuangbin 阅读(855) 评论(0) 推荐(0)

POJ 3133 Manhattan Wiring (插头DP)
摘要:Manhattan WiringTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 1110Accepted: 634DescriptionThere is a rectangular area containing n × m cells. Two cells are marked with “2”, and another two with “3”. Some cells are occupied by obstacles. You should connect the two “2”s and also the tw 阅读全文

posted @ 2012-09-28 16:35 kuangbin 阅读(1441) 评论(0) 推荐(0)

导航

JAVASCRIPT: