UVA11931 Maze Escape

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=229&page=show_problem&problem=3082 [PDF](https://uva.onlinejudge.org/external/119/p11931.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11931/35921916b2a65f2c40a11543d38fdf2d6ece25f2.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11931/f624e2c390483a01b9f21af5d4cde23181e5d6cd.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11931/c9eca35ef52f68c78833fabcf7b8b4fe570b474d.png)