摘要:
最小生成树: 求一个有 n 个结点的连通图的生成树是原图的极小连通子图,且包含原图中的所有 n 个结点,并且有保持图连通的最少的边. 1:Prim算法(适合稠密图) 伪代码: Prim(G){ //G为图 int addnow[maxen];//记录当前有多少点被纳入集合; int lowcost[ 阅读全文
摘要:
POJ 2965 The Pilots Brothers' refrigerator Description The game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs 阅读全文