请问丝瓜雌蕾才1.5公分就黄掉了是缺什么肥料么# gardening - 拈花惹草
k*e
1 楼
input: a circular array
output: a subvector of the array that has max sum
可以想象排列在圆周上的n个元素,求连续的k个使得其和最大
我的想法是
1. take any element as the leader and break the circle into one dimensional
array a[1:n]. use the classical method to get the maxsum subvector
2. we did not consider the case that the maxsum subvector in the circle
passes a[1]. in the next step we will figure out the maxsum subvector that
passes a[1], suppose it is a[n - i:j].
3. claim: a[j+1:n-i-1] is the minsum subvector of a[1:n]. beca
output: a subvector of the array that has max sum
可以想象排列在圆周上的n个元素,求连续的k个使得其和最大
我的想法是
1. take any element as the leader and break the circle into one dimensional
array a[1:n]. use the classical method to get the maxsum subvector
2. we did not consider the case that the maxsum subvector in the circle
passes a[1]. in the next step we will figure out the maxsum subvector that
passes a[1], suppose it is a[n - i:j].
3. claim: a[j+1:n-i-1] is the minsum subvector of a[1:n]. beca