This problem is in Contest(s) below:
Contest 1400:【算法设计与分析】实验六
Contest 1402:【算法设计与分析】实验6 动态规划算法设计与实践2
Contest 1527:算法实验6