MinOr Tree
HardRating 1900CodeforcesGraph Theory (MST, SCC, Bridges)
Approach hintTry it first, then revealHide
Decide bits from the highest down. Tentatively forbid the current bit and use a DSU to check whether the edges avoiding every forbidden bit still connect the graph; keep the bit forbidden only if they do.