DFS - 迷宫路径(找一条可行路径)
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.
题目描述
给定 n×m 迷宫,0 表示路,1 表示墙。从左上角 (0,0) 到右下角 (n-1,m-1),找一条路径(只输出 YES 或 NO)。
输入格式
第一行两个整数 n, m。 接下来 n 行,每行 m 个数(0/1)。
输出格式
能到达输出 YES,否则 NO。
示例
输入:
3 3
0 0 0
0 1 0
0 0 0
输出:
YES
6月7日
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 2
- Start at
- 2026-6-7 8:00
- End at
- 2026-6-7 18:00
- Duration
- 10 hour(s)
- Host
- Partic.
- 6