This problem is in Contest(s) below:
Contest 1284:枚举法
Contest 1352:枚举法入门
Contest 1441:YC-NOIP普及
Contest 1112:递归
Contest 1119:递归入门
Contest 1365:训练111