UVA10804 Gopher Strategy

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1745 [PDF](https://uva.onlinejudge.org/external/108/p10804.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10804/5b7e71bc03fbc3e7aae6a9408642407c2cbfdae0.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10804/4ead72bc02f1d404d4fe8b3e7da2c48ef59abadb.png)