This problem is in Contest(s) below:
Contest 2840:2025暑假集训-深度优先搜索(2)
Contest 1237:回溯算法练习2
Contest 1503:回溯算法练习2