快速幂+最短路+DP
摘要:快速幂+最短路+DP acw347 Code: #include<bits/stdc++.h> using namespace std; const int N = 210,M=110,INF=0x3f3f3f3f; int n, m; int g[N][N],res[N][N];//初始时g表示的
阅读全文
Floyd求无向图的最小环问题
摘要:acw344 Floyd求无向图的最小环问题 #include<bits/stdc++.h> using namespace std; const int N = 110,M=10010,INF=0x3f3f3f3f; int maxk[N][N]; int n, m; int g[N][N]; i
阅读全文
dijsktra次短路计数问题
摘要:Link 次短距离一定只能由次短距离更新 代码: #include <iostream> #include <cstring> #include <algorithm> #include <queue> #include<vector> using namespace std; const int
阅读全文