This problem is used in private contest:2023届练习22 动态规划