sum of subarray minimums

join shbcf.ru