最小生成树
文章平均质量分 56
sunshine668
这个作者很懒,什么都没留下…
展开
-
hdu 1863 畅通工程
Description 省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。 Input 测试输入包含若干测试用例。每个测试用例的第1行给出评估的道路条数 N、村庄数目M (原创 2014-04-23 22:57:42 · 368 阅读 · 0 评论 -
poj 3026 Borg Maze
Description The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe the group consciousness of the Borg原创 2014-08-06 16:42:06 · 295 阅读 · 0 评论 -
hdu 1875 畅通工程再续
Problem Description 相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米原创 2014-08-10 15:35:11 · 332 阅读 · 0 评论 -
hdu 1162 Eddy's picture
Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his small room, and he usually puts out his newest pictu原创 2014-08-10 16:55:59 · 318 阅读 · 0 评论 -
prim最小生成树
#include #include #include #include #include using namespace std; #define inf 0x3f3f3f3f int m,n,g[200][200],d[200]; bool v[200]; int prim() { int i,j,k,min,s=0; for(i=1;i<=m;i++) {原创 2016-02-26 14:56:00 · 252 阅读 · 0 评论