$ CF888G \ Xor-MST $ Minimum Spanning Tree

Positive Solutions: minimum spanning tree

Report problem solving:

Portal $ QwQ $

We found $ Kruskal $ and $ Prime $ are not to do, so consider the $ B $ algorithm.

Probably the first Hong Kong under $ B $ algorithm processes lie $ QwQ $. Probably, each find the nearest Unicom Unicom block for each block, even the edges. Has been doing it just fine. Because every time Unicom will at least reduce the number of blocks one-half, so do most $ logn $ times.

Then look at this question now. $ B $ considering reverse simulation algorithm process

Thus viewed from high to low, if there are found also in the current bit 1 0, the link between the two blocks and only even necessarily even an edge, the remaining two must be respectively connected to the link blocks, so long as it is to find two the shortest link between the two blocks on the line, is inserted directly in the next query $ Trie tree $ $ QwQ $ line

$over$

Guess you like

Origin www.cnblogs.com/lqsukida/p/11613623.html