UVA12496 Fisherman's Dilemma

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=279&page=show_problem&problem=3940 [PDF](https://uva.onlinejudge.org/external/124/p12496.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12496/cc48ae1682e8daeeb9dc9bc5d623e99ee60052cd.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12496/707d99cb6f3085cc19cdde58944b6c155ffafb8a.png)

Output Format

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