This problem is in Contest(s) below:
Contest 2217:分治算法练习赛2022
Contest 2539:软件工程 22A1《专业实训1》分治算法