NYOJ 502筹建工程

题目链接:here~~

#include 
#include 
#include 
#include 
#include 
using namespace std;
struct ue
{int x, y, w;bool operator < (ue a)const{return w>a.w;}
};
priority_queue p;
int f[101];
int find(int x){return f[x]==x?x:f[x]=find(f[x]);}
int main()
{int N, n, m, i, j;ue a, b;
//  freopen("in.txt", "r", stdin);cin>>N;while (N--){while (!p.empty()) p.pop();for (i=0;i<101;i++) f[i]=i;cin>>n>>m;for (i=0; i>a.x>>a.y>>a.w;if (a.x==a.y) continue;p.push(a);}if (n



本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部