This problem is in Contest(s) below:
Contest 1002:分支程序设计