This problem is in Contest(s) below:
Contest 1061:DFS练习
Contest 1493:算法班第三天晚测
Contest 1448:搜索优化(剪枝、记忆化)
Contest 1427:搜索练习