This problem is in Contest(s) below:
Contest 1062: 032中级-晋级挑战
Contest 1043:C++L2阶段作业
Contest 1039:C++L1阶段作业