链接:https://codeforces.com/contest/1253/problem/C
Tsumugi brought nn delicious sweets to the Light Music Club. They are numbered from 11 to nn, where the ii-th sweet has a sugar concentration described by an integer aiai.
Yui loves sweets, but she can eat at most mm sweets each day for health reasons.
Days are 11-indexed (numbered 1,2,3,…1,2,3,…). Eating the sweet ii at the dd-th day will cause a sugar penalty of (d⋅ai)(d⋅ai), as sweets become more sugary with time. A sweet can be eaten at most once.
The total sugar penalty will be the sum of the individual penalties of each sweet eaten.
Suppose that Yui chooses exactly kk sweets, and eats them in any order she wants. What is the minimum total sugar penalty she can get?
Since Yui is an undecided girl, she wants you to answer this question for every value of kk between 11 and nn.
Input
The f