This problem is in Contest(s) below:
Contest 2374:《专业课程设计2》大数据22C2 - 回溯算法(2)
Contest 2445:深度优先搜索练习2023
Contest 2650:2024暑假集训-深度优先搜索
Contest 2213:全排列练习赛2022