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