UVA985 Round and Round Maze

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=926 [PDF](https://uva.onlinejudge.org/external/9/p985.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA985/321815e7a44510dcc32f657b6ce689288c369453.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA985/5aeaa1f2b9827cccd3320eb783e044a2f3350179.png)

Output Format

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