This problem is in Contest(s) below:
Contest 1051:2021小学市赛贪心专题
Contest 1142:基础班-贪心
Contest 1018:2019CSP复赛练习题