UVA243 Theseus and the Minotaur (II)

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=179 [PDF](https://uva.onlinejudge.org/external/2/p243.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA243/ec66188659bbf6d57c7aa6ee4f4aa229c5be0676.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA243/39c324e0c0c252ad566eeb70bdcefd0f86c8d473.png)