搜索
文章平均质量分 81
Accepted_Lam
不怎么看优快云 有事请联系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 · 337 阅读 · 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 · 362 阅读 · 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 · 252 阅读 · 0 评论
分享