This problem is in Contest(s) below:
Contest 1147:动态规划专项
Contest 1153:动态规划专项