This problem is in Contest(s) below:
Contest 1403:【算法设计与分析】实验七
Contest 1404:【算法设计与分析】实验7 贪心算法
Contest 1530:算法实验7