BFS - 迷宫最短步数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
同上迷宫定义,求从 (0,0) 到 (n-1,m-1) 的最少步数(每步上下左右),若无法到达输出 -1。
输入输出示例
输入:
3 3
0 0 0
0 1 0
0 0 0
输出:
4
26年5月24日测评【深度搜索和广度搜索】
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 4
- Start at
- 2026-5-24 8:30
- End at
- 2026-5-24 18:30
- Duration
- 10 hour(s)
- Host
- Partic.
- 5