随笔分类 -  -------图论-------

摘要:problemsolutioncodes//标程Dijkstra#include#include#includeusing namespace std;//Tint n = 60, m, vis[1010];//Graphstruct Edge{ int v, ... 阅读全文
posted @ 2018-05-27 21:21 gwj1139177410 阅读(122) 评论(0) 推荐(0)
摘要:problemsolutioncodes//kosaraju#include#include#include#define maxn 200010using namespace std;vectorG[maxn], rG[maxn];vectorvs, cmp[max... 阅读全文
posted @ 2018-05-23 12:16 gwj1139177410 阅读(116) 评论(0) 推荐(0)
摘要:problem给出一个有向图求从某一点出发到所有点的最短路solutionSPFAcodes#include#include#include#define maxn 10010#define maxm 500010using namespace std;//Grape... 阅读全文
posted @ 2018-05-23 12:15 gwj1139177410 阅读(113) 评论(0) 推荐(0)
摘要:题面:给定一个二分图 求最大匹配思路:匈牙利算法,DFS版本。O(V*E) #include#include#includeusing namespace std;const int N = 3e6;vectorG[N];int po[N], book[N], ans... 阅读全文
posted @ 2018-04-17 21:01 gwj1139177410 阅读(196) 评论(0) 推荐(0)
摘要://即缩点拓扑序以后最后一个SCC的大小#include#include#include#include#define maxn 10010using namespace std;vectorG[maxn],rG[maxn],cmp[maxn],vs;int vis[... 阅读全文
posted @ 2018-03-28 21:16 gwj1139177410 阅读(102) 评论(0) 推荐(0)

选择