This problem is in Contest(s) below:
Contest 1003:竞赛基础题型练习