![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
Accepted_Lam
不怎么看CSDN 有事请联系QQ:915673037
展开
-
HDU 1495 BFS
看了题解才明白要用BFS...接下来要弄清BFS DFS的异同 代码有点太长了...感觉还能优化...先把题补完了再回来想吧 #include #include #include #include #include using namespace std; const int maxn = 120; int s, n, m; int visit[maxn][maxn]; //改进...其原创 2018-02-03 22:14:58 · 244 阅读 · 0 评论 -
HDU 2717
今天练了一道BFS的题(算是水题吧...然而中间还是出了几次错才AC...不过经过这题 感觉对BFS认识更深刻了一点 下次继续努力吧) Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤原创 2018-02-04 11:09:28 · 282 阅读 · 0 评论 -
POJ 3984 迷宫问题
定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。 Input 一个5原创 2018-02-06 10:41:33 · 178 阅读 · 0 评论