摘要: 题目来源: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 奋斗青春 阅读(535) 评论(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 奋斗青春 阅读(1621) 评论(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 奋斗青春 阅读(492) 评论(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) 编辑
摘要: Dancing Links 重复覆盖问题~题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3498这两天学习了Dancing Links ,它主要对搜索的优化,尤其对于矩阵, 进行深搜的时候,随着层数的加深,矩阵会越来越稀疏,如果还是用一般的遍历的话,时间还是没变,还是遍历整个矩阵, 因为矩阵已经变稀疏了,这样做很显然的浪费时间,这里用到Dancing Links,相信它优美的舞步,一定能打动你的。。Dancing Links用到一个十字链表, 众所周知 链表对于插入和删除的处理 时间复杂度都是O(1), 这里就要用到链表的这一特性,对矩阵的某一 阅读全文
posted @ 2011-08-07 08:55 奋斗青春 阅读(569) 评论(0) 推荐(0) 编辑