![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Bron-Kerbosch算法
DZYO
Never stop
展开
-
BZOJ3548: [ONTAK2010]Party(Bron–Kerbosch算法)
传送门 题解: 缩完点后做最大点权独立集。 用Bron–Kerbosch算法枚举极大团即可。 时间复杂度O(3n3)O(3n3)O(3^{\frac{n}{3}}) #include <bits/stdc++.h> using namespace std; inline int rd() { char ch=getchar(); int i=0,f=1; w...原创 2018-02-07 21:52:29 · 620 阅读 · 0 评论 -
poj2989:All Friends(Bron–Kerbosch算法)
传送门 题意: 最大团计数。 题解: 这种题只能深搜了。。但是深搜要讲方法,有一种极大团计数高效算法,可以跑n=100" role="presentation">n=100n=100n=100的稠密图,甚至能跑上万的稀疏图,这就是Bron–Kerbosch算法。 算法流程(from wiki): BronKerbosch1(R, P, X): " role="原创 2018-02-07 20:16:07 · 1239 阅读 · 0 评论 -
Codeforces 839E :Mother of Dragons(Bron–Kerbosch算法)
传送门 题解: 先猜结论:最后一定是均分最大团。 然后就是板了。。 #include #define rd(x) scanf("%d",&x) #define LD long double using namespace std; const int N=42; int n,k,mx; int nv[N][N],Some[N][N],None[N][N]; inline void原创 2018-02-07 20:44:20 · 355 阅读 · 0 评论