UVA12255 Underwater Snipers

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=244&page=show_problem&problem=3407 [PDF](https://uva.onlinejudge.org/external/122/p12255.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12255/f5e2f6e3a3fd541499ef7d114e84f8fa77ca77a0.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12255/7d2d3a51875d294f49507fff86780cfb95c01a68.png)

Output Format

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