This problem is in Contest(s) below:
Contest 1202:c++新生(刷题)