UVA10885 Martin the Gardener

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1826 [PDF](https://uva.onlinejudge.org/external/108/p10885.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10885/7132958f0050b9986eb3993345dee6df551a5e2e.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10885/50cf248a41335e1fc39971ece530ff09ea5e2a50.png)

Output Format

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