This problem is in Contest(s) below:
Contest 1038:csp/noip图论专练
Contest 1133:2022提高STL
Contest 1085:2021CSP第二轮专题4-搜索
Contest 1115:搜索高阶练习