#include #include typedef long long int int64; typedef struct wedge{ int a,b,c; } edge; int root(int *u,int x){ if(u[x]==x) return x; return u[x]=root(u,u[x]); } int same(int *u,int x,int y){ return root(u,x)==root(u,y); } void unite(int *u,int x,int y){ x=root(u,x); y=root(u,y); if(x==y) return; u[x]=y; } int cmp(const void *a,const void *b){ return (*(edge *)a).c-(*(edge *)b).c; } void run(void){ int n,m,k; scanf("%d%d%d",&n,&m,&k); edge *e=(edge *)calloc(m,sizeof(edge)); int i; for(i=0;i