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 · 715 阅读 · 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 · 1363 阅读 · 0 评论 -
Codeforces 839E :Mother of Dragons(Bron–Kerbosch算法)
传送门题解: 先猜结论:最后一定是均分最大团。然后就是板了。。#include #define rd(x) scanf("%d",&x)#define LD long doubleusing 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 · 461 阅读 · 0 评论
分享