UVA11782 Optimal Cut

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=117&page=show_problem&problem=2882 [PDF](https://uva.onlinejudge.org/external/117/p11782.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11782/d9984c4b84c880434f9f4befe32db9372bd9a224.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11782/9344096117cbfbf01be4530f0ed425220d0e5be4.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11782/8984488cb77cbba0e2dd18cb9ecb7c9e775dc7b9.png)