This problem is in Contest(s) below:
Contest 1203:枚举算法练习