This problem is in Contest(s) below:
Contest 1237:回溯算法练习2
Contest 1503:回溯算法练习2