一個很好的搜索題分類,共36道題。沒有做完(估計做不完了),但收穫很大。轉載很多,已不知原作者是誰,但感謝原作者的分享。
pku1175 Starry Night
題目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1175
解法:BFS,要注意的是如何判斷圖形是一樣的,我的做法就是計算每兩個點的距離之和。
看:http://hi.baidu.com/doxi_free/blog/item/2e3b6ea8fff309fa1f17a238.html
pku1020 Anniversary Cake
題目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1020
解法:dfs 簡單題目。
pku1077 Eight
題目地址:http://162.105.81.212/JudgeOnline/problem?id=1077
解法:廣搜,雙向光搜,A*,IDA* 其中 A* 時間最好,雙向的廣搜也ok ,IDA*時間500+
看:http://hi.baidu.com/doxi_free/blog/item/cd991bd00c111a309b5027a3.html
pku2286 The Rotation Game
題目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=2286
解法:IDA* ,廣度優先應該也是可以的。
看:http://hi.baidu.com/doxi_free/blog/item/f21ddb25bc62b9358744f9ed.html
pku1480 Optimal Programs
題目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1480
解法:DFS ,我也不知道,有些像是IDA* ,用BFS MLE 。
看:http://hi.baidu.com/doxi_free/blog/item/1e3ac6f9c7fce209d8f9fd53.html
pku1419 Graph Coloring
地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1419
解法:DFS ,用臨街鏈表存儲圖形
http://hi.baidu.com/doxi_free/blog/item/085dbadc0bfdab3c5882dd25.html
pku1324 Holedox Moving
題目地址: http://acm.pku.edu.cn/JudgeOnline/problem?id=1324
解法:BFS,要用位處理尾巴,但是zfy有更好的方法。
看:http://hi.baidu.com/doxi_free/blog/item/2f7e17f22abc7856352acca5.html
pku1475 Pushing Boxes
題目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1475
解法:BFS ,在中間用了兩個BFS 第一個是找到總的路徑,第二個是輸出路徑;
pku1691 Painting A Board
題目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1691
解法:dfs 簡單
看:http://hi.baidu.com/doxi_free/blog/item/69611728d62e00f898250a06.html
poj1725 BALL
地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1725
解法:dfs 簡單 不需要剪枝和任何的優化
看:http://hi.baidu.com/doxi_free/blog/item/cf30bf590cc1bfd99d82042b.html
poj1574 The Triangle Game
地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1574
解法:dfs 簡單 ,與 1725一樣需要編號,或許要有一個上界剪枝
看:http://hi.baidu.com/doxi_free/blog/item/a41378fa30c2bb116d22eba5.html
POJ1069 -The Bermuda Triangle
地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1069
解法:dfs
看:http://hi.baidu.com/doxi_free/blog/item/13fc940020242805728da55f.html
POJ1084 - Square Destroyer
http://acm.pku.edu.cn/JudgeOnline/problem?id=1084
解法: A* 難想
POJ1167 - The Buses
http://acm.pku.edu.cn/JudgeOnline/problem?id=1167
解法:DFS 需要一些剪枝纔可以過的。
pku1137 The New Villa
地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1137
解法: 簡單的bfs ,用位表示狀態。
看:http://hi.baidu.com/doxi_free/blog/item/2aa0b1831cecd3b86d81195f.html
POJ1190 - 生日蛋糕
http://acm.pku.edu.cn/JudgeOnline/problem?id=1190
解法: DFS 黑書上有解法,很好的一個題目,剪枝很重要。
POJ1945 - Power Hungry Cows
http://acm.pku.edu.cn/JudgeOnline/problem?id=1945
POJ1950 Dessert
http://acm.pku.edu.cn/JudgeOnline/problem?id=1950
直接的 dfs 不剪枝 170 ms 那位提示提示剪枝
POJ2044 - Weather Forecast
http://acm.pku.edu.cn/JudgeOnline/problem?id=2044
解法: BFS ,注意四個角落的就可以滿足所有的地方達到要求。
POJ2308 - Dearboy's Puzzle
http://acm.pku.edu.cn/JudgeOnline/problem?id=2308
解法:dfs+ bfs
看:http://hi.baidu.com/zfy0701/blog/item/c62f41af65aa1fca7cd92afc.html
POJ2449 Remmarguts' Date
http://acm.pku.edu.cn/JudgeOnline/problem?id=2449
解法:dijkstra + A*
看:http://hi.baidu.com/doxi_free/blog/item/905df0554e675d5ed10906cb.html
POJ2688 - Cleaning Robot
http://acm.pku.edu.cn/JudgeOnline/problem?id=2688
解法:bfs建立圖形,dfs 找到最短的。
看:http://hi.baidu.com/doxi_free/modify/blog/2a62aa002a824ad0277fb5f4
POJ2908 - Quantum
http://acm.pku.edu.cn/JudgeOnline/problem?id=2908
解法: 優先隊列 bfs
看:http://hi.baidu.com/doxi_free/blog/item/82ab806fd9be46dd80cb4a64.html
POJ3074 - Sudoku
http://acm.pku.edu.cn/JudgeOnline/problem?id=3074
解法: dfs 有一些的難度
看:http://hi.baidu.com/doxi_free/blog/item/44ba7cdb8e8937dcb6fd48ac.html
POJ3635 full tank?
http://acm.pku.edu.cn/JudgeOnline/problem?id=3635
解法:priority_queue + bfs;
看:http://hi.baidu.com/hnu_reason/blog/item/086e3dccfc8cb21600e9286b.html
ZOJ3059 Die Board Game
解法: bfs ,一個很好的題目,
看:http://hi.baidu.com/doxi_free/blog/item/e9b116c6729fe0dbd000604d.html
POJ1872 A Dicey Problem
http://acm.pku.edu.cn/JudgeOnline/problem?id=1872
解法: bfs 搜索的順序 上下左右 然後就是用三位或是二位來表示狀態
看http://hi.baidu.com/doxi_free/blog/item/fc4621d6048b8ed5a044df54.html
WHOJ1407 2-Dimensional Rubik's Cube bfs
http://acm.whu.edu.cn/oak/problem/problem.jsp?problem_id=1407
一個很好的bfs的題目,不過難度不大 。
看:http://hi.baidu.com/doxi_free/blog/item/6f5a46616822ae4cebf8f8fd.html
Hdu 2209 翻紙牌遊戲
地址: http://acm.hdu.edu.cn/showproblem.php?pid=2209
看:http://hi.baidu.com/doxi_free/blog/item/b841950ffce468ef36d122f4.html數組的設計
地址:http://162.105.81.212/JudgeOnline/problem?id=2157
看:http://hi.baidu.com/doxi_free/blog/item/4eb456ca271da817be09e687.html
http://acm.hdu.edu.cn/showproblem.php?pid=1429
HDU1885 Key Task (BFS)
題目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1885
簡單的bfs 狀態最好是用位表示;
看:http://hi.baidu.com/doxi_free/blog/item/14cfe61219659d2bdd5401dd.html
xmu1128.坦克大戰 ( bfs)
地址:http://acm.xmu.edu.cn/JudgeOnline/problem.php?id=1128
看:http://hi.baidu.com/doxi_free/blog/item/0ea38c45a6adff8ab3b7dc45.html
pku1198 Solitaire && zoj 1505 Solitaire
題目地址:http://162.105.81.212/JudgeOnline/problem?id=1198
解法 : bfs, 雙向的 BFS , ID也應該可以的...
看:http://hi.baidu.com/doxi_free/blog/item/91847c3c53a558e73d6d97df.html
hud 1198 Farm Irrigation &&zoj 2142 Farm Irrigation
地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2412
解法 : dfs 如何設計 ......
看:http://hi.baidu.com/doxi_free/blog/item/0e55f9061188e4c47b89479e.html
poj1697 The Erythea Campaign( BFS)
解法:有限隊列的bfs .
看:http://hi.baidu.com/doxi_free/blog/item/657dbf44243bf43686947358.html