图论_最小生成树
染指的流年
这个作者很懒,什么都没留下…
展开
-
hdu 1233 还是畅通工程
很简单的一道题,代码附上: #include #include using namespace std; int num[10002]; struct road { int x; int y; int len; } p[10001]; int cmp(struct road a,struct road b) { return a.len<b.len; }原创 2014-02-20 10:36:34 · 894 阅读 · 0 评论 -
hdu 1863 畅通工程
第一次接触最小生成树,也不知道自己写的这个算不上,只知道自己wa了好多次,都是因为一些细节。。。 #include #include using namespace std; struct road { int x; int y; int mon; }p[10002]; int city[10002]; int cmp(struct road a,struct roa原创 2014-02-20 10:30:02 · 853 阅读 · 0 评论