add dp analysis

Signed-off-by: Wei Jin <wjin.cn@gmail.com>
maximum sum of m segments

Signed-off-by: Wei Jin <wjin.cn@gmail.com>