This problem is in Contest(s) below:
Contest 1003:递推算法
Contest 1187:2022秋周六晚c++6期
Contest 1190:2022秋周日早c++6期
Contest 1191:2022秋周日下c++8期