随笔分类 - -------图论-------
摘要:problemsolutioncodes//标程Dijkstra#include#include#includeusing namespace std;//Tint n = 60, m, vis[1010];//Graphstruct Edge{ int v, ...
阅读全文
摘要:problemsolutioncodes//kosaraju#include#include#include#define maxn 200010using namespace std;vectorG[maxn], rG[maxn];vectorvs, cmp[max...
阅读全文
摘要:problem给出一个有向图求从某一点出发到所有点的最短路solutionSPFAcodes#include#include#include#define maxn 10010#define maxm 500010using namespace std;//Grape...
阅读全文
摘要:题面:给定一个二分图 求最大匹配思路:匈牙利算法,DFS版本。O(V*E) #include#include#includeusing namespace std;const int N = 3e6;vectorG[N];int po[N], book[N], ans...
阅读全文
摘要://即缩点拓扑序以后最后一个SCC的大小#include#include#include#include#define maxn 10010using namespace std;vectorG[maxn],rG[maxn],cmp[maxn],vs;int vis[...
阅读全文