UVA12069 Robots inside the Labyrinth

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=242&page=show_problem&problem=3221 [PDF](https://uva.onlinejudge.org/external/120/p12069.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12069/791c5437fb1248d3aad5814546a07b50faad75b6.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12069/99e9957bcfe6b6c271194024f651417a049e8c25.png)

Output Format

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