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