摘要: P3806 【模板】点分治 1 点分治是一种树上的分治算法,即每次找到当前子树的重心并将其作为子树的根,进而对该子树的部分问题进行递归求解,这样可以保证递归层数不超过\(\log {n}\)。 #include<bits/stdc++.h> using namespace std; const in 阅读全文
posted @ 2024-08-27 17:01 Frederic0728 阅读(14) 评论(0) 推荐(0)