随笔分类 -  图论 -- Folyd

摘要:https://www.acwing.com/problem/content/346/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie( 阅读全文
posted @ 2021-02-14 15:33 phr2000 阅读(42) 评论(0) 推荐(0)
摘要:https://www.acwing.com/problem/content/345/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie( 阅读全文
posted @ 2021-02-14 15:30 phr2000 阅读(75) 评论(0) 推荐(0)
摘要:https://www.acwing.com/problem/content/1127/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie 阅读全文
posted @ 2021-02-14 15:27 phr2000 阅读(72) 评论(0) 推荐(0)
摘要:https://www.acwing.com/problem/content/347 \(求从起点S到终点E恰好经过N条边(可以重复经过)的最短路.\) \(即求出原距离矩阵的N次方,可以用类似qmi()的方式优化.\) #include <bits/stdc++.h> using namespac 阅读全文
posted @ 2021-02-14 15:19 phr2000 阅读(51) 评论(0) 推荐(0)