This problem is in Contest(s) below:
Contest 1043:C++L2阶段作业
Contest 1061:031中级-新手上路
Contest 1038:CCC Junior 算法基础训练