UVA10307 Killing Aliens in Borg Maze

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=15&page=show_problem&problem=1248 [PDF](https://uva.onlinejudge.org/external/103/p10307.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10307/82fd4aef5a8d38b10e51df9f8da4893f9694ee98.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10307/61d1e50a6bc4ed59beb4cd4237721dc46bc00ab1.png)