Key Task 题目链接: http://acm.hust.edu.cn/vjudge/contest/129733#problem/D Description The Czech Technical University is rather old -- you already know that it celebrates 300 years of its existence in 2007. Some of the university buildings are old as well…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1429 思路分析:题目要求找出最短的逃亡路径,但是与一般的问题不同,该问题增加了门与钥匙约束条件: 考虑一般的搜索问题的解答思路: 搜索算法即在解空间中搜索满足要求的答案,可以看做一棵不断生长的状态树,状态之间不断扩展出新的状态,直到找出所需要的状态,即答案: <1>定义状态:对于该问题,由于存在门与锁的约束条件,所以状态应该包括3个元素,即人所在的坐标 x 和 y 以及含有锁的种类: <2&…