This problem is in Contest(s) below:
Contest 5547:提高C-寒假3课-课堂练习
Contest 5554:提高C-寒假7课-课堂练习