Output a single positive integer: under the optimal storage plan, the total time required to access these nnn files individually (the result is less than 2312^{31}231).
4 3 3 5 4
28
Constraints
1≤n≤10001 \le n \le 10001≤n≤1000, 2≤k≤1502 \le k \le 1502≤k≤150, 1≤Pi≤1501 \le P_i \le 1501≤Pi≤150.
Translated by ChatGPT 5
注册一个 云斗学院 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 云斗学院 通用账户