UVA10488 Swimming Gopher

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=16&page=show_problem&problem=1429 [PDF](https://uva.onlinejudge.org/external/104/p10488.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10488/4bf24fb45bf7a03f41d3c0b94614c41b114daf08.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10488/977956de3b6fada154474b908cc6e87a9a925210.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10488/375723c2071d9188ab658825fd20c170000c122a.png)