Title
摘要: #图解 #AcWing 861. 二分图的最大匹配 #include<bits/stdc++.h> using namespace std; const int N = 5E2+10,M = 1E5+10; int n1,n2,m; int h[N],ne[M],e[M],idx=0; void a 阅读全文
posted @ 2021-07-21 22:00 BeautifulWater 阅读(34) 评论(0) 推荐(0) 编辑
摘要: #AcWing 860. 染色法判定二分图 860. 染色法判定二分图 给定一个 n 个点 m 条边的无向图,图中可能存在重边和自环。 请你判断这个图是否是二分图。 二分图里面可能存在多个联通块 二分图:把点分成两个集合,且线段上的两点比分属于两个不同的集合(阵营),当出现第三个集合(阵营时),该图 阅读全文
posted @ 2021-07-21 16:47 BeautifulWater 阅读(66) 评论(0) 推荐(0) 编辑
摘要: #AcWing 1227. 分巧克力 #include<bits/stdc++.h> using namespace std; const int N = 1e5; struct chocolate{ int l; int w; int minlen; bool operator <(const s 阅读全文
posted @ 2021-07-21 14:04 BeautifulWater 阅读(34) 评论(0) 推荐(0) 编辑