#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// 边结构体
struct Edge {
int u, v, weight;
};
// 并查集,用于判断两个节点是否在同一连通块中
class UnionFind {
public:
UnionFind(int n) : parent(n + 1), rank(n + 1, 0) {
for (int i = 1; i <= n; i++) {
parent[i] = i;
}
}
private:
vector<int> parent;
vector<int> rank;
};
// 最小生成树算法(Kruskal)
int minimumSpanningTree(int n, vector<Edge>& edges) {
// 按边权重升序排序
sort(edges.begin(), edges.end(), [](const Edge& a, const Edge& b) {
return a.weight < b.weight;
});
}
int main() {
int n, m;
cin >> n >> m;