上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页
摘要: 这些天一直在搞搜索, 从Dancing Links 到 A*,IDA*, 之前把Dancing Links刷了几道,这两天在搞 A*,和IDA*, 目前终于把hdu上的几道IDA*刷完了。。参考大牛博客:http://www.cnblogs.com/ambition/archive/2011/07/25/search_plus.htmlHDU 1667The Rotation Game 状态很多,IDA*是必须的, 每次可以移动八个方向, 可以构造h()=8-max(1,2,3); max(1,2,3)表示中间的八个位置中出现最多的数的个数。 因为每次操作只能改变中间8个中的一个,所以可以这样 阅读全文
posted @ 2011-08-14 11:28 奋斗青春 阅读(344) 评论(0) 推荐(1) 编辑
摘要: 某位神牛曾说过,此题是涉及到人生完不完整的一道题。。Goodness大牛曾总结了 八数码的八重境界 : http://www.cnblogs.com/goodness/archive/2010/05/04/1727141.html足见此题的重要性。题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1043本人不才,只写出了其中几个。。1、 暴搜+离散+二分一直以来没用过hash表,这次首先想到的也是二分,先dfs找出所有状态36w+,然后离散化,之后就可以进行暴搜了,hdu TLE,pku500ms。。2、 单广预处理上网搜了下,发现逆序数hash要 阅读全文
posted @ 2011-08-12 10:33 奋斗青春 阅读(3302) 评论(0) 推荐(1) 编辑
摘要: 题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=2119MatrixTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 669Accepted Submission(s): 239Problem DescriptionGive you a matrix(only contains 0 or 1),every time you can select a row or a column and delete 阅读全文
posted @ 2011-08-10 10:19 奋斗青春 阅读(722) 评论(0) 推荐(1) 编辑
摘要: 题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=3156Repair DepotsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 246Accepted Submission(s): 61Problem DescriptionRoboCorp Oregon has already deployed several of its PoliceBots throughout the state, and 阅读全文
posted @ 2011-08-09 20:13 奋斗青春 阅读(1092) 评论(0) 推荐(0) 编辑
摘要: SudokuTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5624Accepted: 1718DescriptionIn the game of Sudoku, you are given a large 9 × 9 grid divided into smaller 3 × 3 subgrids. For example,.2738..1..1...6735.......293.5692.8...........6.1745.364.......9518...7..8..6534.Given some o 阅读全文
posted @ 2011-08-09 17:26 奋斗青春 阅读(1945) 评论(0) 推荐(0) 编辑
摘要: 题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=3663Power StationsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 603Accepted Submission(s): 168Special JudgeProblem DescriptionThere are N towns in our country, and some of them are connected by elect 阅读全文
posted @ 2011-08-08 15:01 奋斗青春 阅读(760) 评论(0) 推荐(0) 编辑
摘要: 题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=3529Bomberman - Just Search!Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 242Accepted Submission(s): 112Problem DescriptionBomberman has been a very popular game ever since it was released. As you ca 阅读全文
posted @ 2011-08-07 20:32 奋斗青春 阅读(524) 评论(0) 推荐(1) 编辑
摘要: 题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=2295RadarTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1023Accepted Submission(s): 405Problem DescriptionN cities of the Java Kingdom need to be covered by radars for being in a state of war. Since t 阅读全文
posted @ 2011-08-07 18:52 奋斗青春 阅读(1618) 评论(0) 推荐(0) 编辑
摘要: 题目来源:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3372Treasure MapTime Limit: 2 Seconds Memory Limit: 32768 KBYour boss once had got many copies of a treasure map. Unfortunately, all the copies are now broken to many rectangular pieces, and what make it worse, he has lost some of the p 阅读全文
posted @ 2011-08-07 17:25 奋斗青春 阅读(491) 评论(0) 推荐(0) 编辑
摘要: 很裸的Dancing Links。。题目链接:http://acm.hust.edu.cn:8080/judge/problem/viewProblem.action?id=10702题目:给你一个0-1矩阵,问你能否精确覆盖,如果可以输出任意一组解,否则输出NO;code:View Code 1 /*Problem: HUST 1017 User: zyzamp 2 Memory: 1924 KB Time: 268 MS 3 Language: C++ Result: Accepted */ 4 # include<stdio.h> 5 # include<string. 阅读全文
posted @ 2011-08-07 11:39 奋斗青春 阅读(1078) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页