UVA12871 Landmine Cleaner

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=861&page=show_problem&problem=4736 [PDF](https://uva.onlinejudge.org/external/128/p12871.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12871/642b8008678908532ab53a8fdccc10c21f9ae221.png)

Input Format

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

Output Format

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