Best Time to Buy and Sell Stock II

a[i - 1] = a[i] - a[i - 1]
之后将a[0..n-1]中的全部正数加起来即可的到结果