UVA13116 Multistory Labyrinth

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=871&page=show_problem&problem=5027 [PDF](https://uva.onlinejudge.org/external/131/p13116.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13116/e7975d045cbcc5a540703588baee58ee0d142128.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13116/9590e6948b972b7d34ea49422b705c3b39541091.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13116/022de790794a9bb61a62ce99875d73c29aafa96e.png)