This problem is in Contest(s) below:
Contest 2221:动态规划基础2022