图论
weifeng2356
这个作者很懒,什么都没留下…
展开
-
差分约束
Luogu - P5960 【模板】差分约束算法//P5960 差分约束 SPFA#include<iostream>#include<cstring>#include<queue>using namespace std;const int INF = 0x3f3f3f3f;const int N = 10004;const int M = 10004;int T;int n, m;struct Edge { int to, next, w;}原创 2021-03-29 16:53:36 · 103 阅读 · 1 评论 -
二分图最大匹配 - 匈牙利算法
Luogu - P3386 【模板】二分图最大匹配//Luogu P3386#include<iostream>#include<vector>#include<cstring>#define N 502using namespace std;int n, m, e;int u, v;int ans;vector<int> G[N];bool vis[N];int match[N];bool dfs(int u) { for(原创 2021-03-26 21:54:45 · 120 阅读 · 0 评论 -
最短路算法
最短路算法Floyd、Dijkstra、Bellman-Ford(、SPFA)、Johnson原创 2021-03-24 23:37:12 · 203 阅读 · 0 评论 -
图的存储
直接存边、邻接矩阵、邻接表、链式前向星原创 2021-02-02 18:57:17 · 87 阅读 · 0 评论