This problem is in Contest(s) below:
Contest 1285:第七届河北省大学生程序设计竞赛校赛
Contest 1143:寒假练习201-1