This problem is in Contest(s) below:
Contest 1048:动态规划进阶
Contest 1062:小学省赛集训动规专题
Contest 1039:csp/noip动态规划专练