
There are n piles of stones arranged in a row. The i ^th pile has stones[i] stones.
A move consists of merging exactly k consecutive piles into one pile, and the cost of this move is equal to the total number of stones in these k piles.
Return the minimum cost to merge all piles of stones into one pile . If it is impossible, return -1 .
n == stones.length1 <= n <= 301 <= stones[i] <= 1002 <= k <= 30