Therefore, they have decided only to fix as many wormholes as they need in order to have all planets reachable from capital and to pay as little money as they have to for this repair.
正确翻译应为:
给定一张 n 点 m 边带边权无向图,保证图为不超过 42 个环的仙人掌。求图的最小异或生成树及其方案数。
1≤n,wi≤105,答案对 109+7 取模。
给定一张 $n$ 点 $m$ 边带边权无向图,保证图为不超过 $42$ 个环的仙人掌。求图的最小异或生成树及其方案数。
$1\le n,w_i\le 10^5$,答案对 $10^9+7$ 取模。