二分图
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 · 116 阅读 · 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 · 243 阅读 · 0 评论 -
暑假集训日记——8.14(codeforce)
E. 3-cycles题意:使得图中不存在长度为3的环,求满足条件的最多边的数目题解:二部图的任意两点的最小环长度大于3#include<bits/stdc++.h>#define mp make_pair#define se second#define fi firstusing namespace std;typedef long long ll;typed...原创 2019-08-15 14:27:34 · 172 阅读 · 0 评论