#ROADS

Rainbow Roads

RainbowRoads题意:给一棵n个结点的树,每条边都有一种颜色,要求找出所有的good点,good点定义:从这个点出发,到其他任意结点的简单路径(最短路径),相邻的两条边颜色都不同。  题解看这里:here不过我想了一下(vis)设成2就可以了1#include<bits/stdc++....
代码星球 代码星球·2020-12-28

Codeforces 806 D. Perishable Roads Dijkstra

原文链接https://www.cnblogs.com/zhouzhendong/p/CF806D.html  给定一个n个点的无向完全图,每一条边有一定的边权。  对于它的一个生成树,我们定义一个节点的花费为该点到根的边权min。  一个生成树的权值为所有节点的花费之和。  对于每一个节点,求出以他为根的最小生成树权...

hdu 1102 Constructing Roads (kruskal)

ConstructingRoadsTimeLimit:2000/1000MS(Java/Others)   MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):28154   AcceptedSubm...

1087 All Roads Lead to Rome (30)

IndeedtherearemanydifferenttouristroutesfromourcitytoRome.Youaresupposedtofindyourclientstheroutewiththeleastcostwhilegainingthemosthappiness.InputSpecification...
代码星球 代码星球·2020-04-08

杭电1102 Constructing Roads

TimeLimit:2000/1000MS(Java/Others)   MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):13518   AcceptedSubmission(s):5128Pro...

百练1724 ROADS

总时间限制: 1000ms  内存限制: 65536kB描述Ncitiesnamedwithnumbers1...Nareconnectedwithone-wayroads.Eachroadhastwoparametersassociatedwithit:theroadlengt...
代码星球 代码星球·2020-04-04