M(j) refers to the max contiguous seq which end at j.

if we know the M(j-1) + a[j] > a[j], then M(j) = M(j-1) + a[j]
else the M(j) = a[j]
tmp can be deleted

because if runningSum > 0, runningSum + a[i] > a[i] can be proved
1. set all the cases including rotation.

so the allBox is three times of a[]

2. quick sort the allBox according to base area

qsort(*a, size, sizeofone, compare)
DP core is finished
just find the highest from the mh[] array