随笔分类 - 图论-模板题
摘要:const int MXN = 1e6 + 5; const int mod = 1e9 + 7; int n, m; int fa[MXN], idx[MXN], vis[MXN]; std::vector mp[MXN]; int mmax; int dfs(int u,int ba) { in
阅读全文
摘要:(有任何问题欢迎留言或私聊&&欢迎交流讨论哦 求树的最大独立集,最小点覆盖,最小支配集 [TOC] 三个定义 最大独立集: 对一个图选出尽量多的点组成一个集合,满足这些点之间没有边相连。所有独立集中,顶点数最多的称作最大独立集。 最小点覆盖: 对一个图选出尽量少的点组成一个集
阅读全文
摘要:UOJ79模板 "here" include include include include using namespace std; int read() { int x=0,f=1; char c=getchar(); for (;!isdigit(c);c=getchar()) if (c==
阅读全文