UVA13214 The Robot's Grid

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=878&page=show_problem&problem=5137 [PDF](https://uva.onlinejudge.org/external/132/p13214.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13214/c4b895be2dcf40e8f8aed6f20d81478e4feb63ff.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13214/48c4c2f939d3c4e4fb4f781ec1e982003b37b696.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13214/517d3e711a29b294994d6b99bd98cb3a8faa7630.png)