二分图
THE END GAME
这个作者很懒,什么都没留下…
展开
-
暑假集训日记——7.8(二分图+网络流)
二分图的定义: 二分图求最大匹配算法: 匈牙利算法讲解 代码模板: #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, int> pli; typedef pair<ll, ll&g...原创 2019-07-08 21:01:38 · 113 阅读 · 0 评论 -
染色和拓扑排序
邻接矩阵 判定二分图:一个无向图为二分图当且仅当图G中无奇数长度的回路。 #include <queue> #include <cstring> #include <iostream> using namespace std; const int N = 999; int col[N], Map[N][N]; //0为白色,1为黑色 bool BFS(int...原创 2019-02-19 01:18:45 · 241 阅读 · 0 评论 -
暑假集训日记——8.14(codeforce)
E. 3-cycles 题意: 使得图中不存在长度为3的环,求满足条件的最多边的数目 题解: 二部图的任意两点的最小环长度大于3 #include<bits/stdc++.h> #define mp make_pair #define se second #define fi first using namespace std; typedef long long ll; typed...原创 2019-08-15 14:27:34 · 160 阅读 · 0 评论