摘要: 最短路 + 矩阵快速幂 我们可以改进矩阵快速幂,使得它适合本题 用图的邻接矩阵和快速幂实现 注意 dis[i][i] 不能置为 0 cpp include include include include include include using namespace std; struct edge 阅读全文
posted @ 2018-03-28 19:33 Mr_Wolfram 阅读(167) 评论(0) 推荐(0) 编辑
摘要: floyd求无向图最小环 +输出路径 注意保存原来的边, 求最小环的时候要用 cpp include include include include include include include using namespace std; int n, m, dis[105][105], ans = 阅读全文
posted @ 2018-03-28 15:18 Mr_Wolfram 阅读(147) 评论(0) 推荐(0) 编辑