# BZOJ3675 APIO2014 序列分割 斜率优化

f[i][k]表示前i天分成k段的答案，那么就有
$$f[i][k]=f[j][k-1]+sum[j]\times (sum[i]-sum[j])(1\leq j\lt i)$$

（好吧这根本就不是自己做的了）

# 题目

## Problem Description

Zero has an old printer that doesn’t work well sometimes. As it is antique, he still like to use it to print articles. But it is too old to work for a long time and it will certainly wear and tear, so Zero use a cost to evaluate this degree.
One day Zero want to print an article which has $$N$$ words, and each word $$i$$ has a cost $$C_i$$ to be printed. Also, Zero know that print $$k$$ words in one line will cost
$$(\sum\limits_{k=1}^kC_i)^2+M$$
$$M$$ is a const number.
Now Zero want to know the minimum cost in order to arrange the article perfectly.