具体可以去这篇博客学习:
https://oi-wiki.org/misc/cdq-divide/