This problem is in Contest(s) below:
Contest 1261:深搜入门