UVA10304 Optimal Binary Search Tree

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=15&page=show_problem&problem=1245 [PDF](https://uva.onlinejudge.org/external/103/p10304.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10304/8240dddbc7a394a9919bfe12ea1df0e5a38b12ed.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10304/5b63358ad156699ebafb2a0a0b6d27baf4fd1d2b.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10304/79b21d984f95af03e88a2fb005e341d755d171c2.png)