kth smallest sum
correct computation