Summer training last quarter of 2019

6.30 BZOJ 3551 by force, starting from a point of asking only the first k v go big point is less than equal to x side can reach. Reconstruction using kruskal tree, that is, when the minimum spanning tree with Kruskal added a new point to a merging point of two connected edges, the points right virtual point is connected to the right side of the two points, thus having monotonicity (by the process kruskal can know this, point right subtree must be less than or equal to the point), so we can find a way to multiply at the right point less than or equal points at the top of x. The tree then come up with dfs order, built Chairman of the tree, thereby doubling first and then find a large range of k. So do online. Offline, then sorted by weight, and then balance the tree merge, and completed the process of doing Kruskal all less than or equal to the right side of all ask?


 

Guess you like

Origin www.cnblogs.com/intwentieth/p/11111398.html