UVA348 Optimal Array Multiplication Sequence

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=5&page=show_problem&problem=284 [PDF](https://uva.onlinejudge.org/external/3/p348.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA348/4f9c48e6a9b2f42e305a52b4cf4b787e747d5a81.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA348/75afad84a4aa951c4d6c4413d94663ef56c59cca.png)