This problem is in Contest(s) below:
Contest 1009:动态规划经典题