This problem is in Contest(s) below:
Contest 1004:递归算法