Comments

Can someone give proof for this in problem F?

"When c≥0 , it can be proven that the minimum cost can be obtained by sorting a in nondecreasing order."