最小生成树
小鱼爱吃火锅
多学习,多积累
展开
-
最小生成树(Kruskal和Prim算法)
关于图的几个概念定义: 连通图:在无向图中,若任意两个顶点vivi与vjvj都有路径相通,则称该无向图为连通图。 强连通图:在有向图中,若任意两个顶点vivi与vjvj都有路径相通,则称该有向图为强连通图。 连通网:在连通图中,若图的边具有一定的意义,每一条边都对应着一个数,称为权;权代表着连接连个顶点的代价,称这种连通图叫做连通网。 生成树:一个连通图的生成树是指一个连通子图,它含有图中全部n...转载 2019-02-10 11:08:19 · 170 阅读 · 0 评论 -
Agri-Net(最小生成树-prim算法模板)
Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. Farmer John order...原创 2019-02-10 12:29:35 · 400 阅读 · 0 评论 -
HDU 2988(Kruskal算法模板+并查集模板)
Economic times these days are tough, even in Byteland. To reduce the operating costs, the government of Byteland has decided to optimize the road lighting. Till now every road was illuminated all nigh...原创 2019-02-10 20:36:14 · 213 阅读 · 0 评论