UVA11531 Solve the Broken Maze

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=27&page=show_problem&problem=2526 [PDF](https://uva.onlinejudge.org/external/115/p11531.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11531/145dfa662ff0e47d0a19e3c40bfcfc6e800e0601.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11531/826ed91eee2ed8a4989d81a291d4e07272490ffa.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11531/85ad6a072cbf5701be5eb721f1ea664215ff5281.png)