
图论 - 最小生成树
Napoleon2004
这个作者很懒,什么都没留下…
展开
-
UVA 1151 Buy or Build
#include<bits/stdc++.h>using namespace std;const int M=1e6+5;struct node{ int xx,yy,zz;}f[M],r[M],w[M];int n,m,l,len;int x[M],y[M],fat[M],num[M],cost[M],a[1010][1010];int cmp(node q,node...原创 2018-04-12 11:07:48 · 163 阅读 · 0 评论 -
UVA 1395 Slim Span
#include<bits/stdc++.h>using namespace std;struct node{ int u,v,d;}a[11000];int n,fat[11000];int cmp(node q,node p){ return q.d<p.d;}int find(int x){ if(x==fat[x])return x;...原创 2018-04-12 11:09:16 · 187 阅读 · 0 评论