![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
八云闲者
这个作者很懒,什么都没留下…
展开
-
3 Steps(二分图初步)
Problem Statement Rng has a connected undirected graph with N vertices. Currently, there are M edges in the graph, and the i-th edge connects Vertices Ai and Bi. Rng will add new edges to原创 2017-10-09 19:33:06 · 232 阅读 · 0 评论 -
模板---割点,割边
割点:: const int N = 100; int nn[N][N],root=1; int dfn[N]={0},low[N]={0},index=0; int flag[N]={0}; //割点 集 void tarjan_gd(int no,int fa) { int child=0,i,j; index++; dfn[no] = index; low[no] = i...原创 2018-10-13 15:46:49 · 87 阅读 · 0 评论 -
模板---最短路径
Floyed算法:: //O(n^3) const int N = 100; int nn[N][N]; void floyed(int n) { int k,i,j; for(k=1;k<=n;k++) { for(i=1;i<=n;i++) { if(i != k) { for(j=1;j<=n;j++) { if(i!...原创 2018-10-13 16:24:40 · 137 阅读 · 0 评论 -
hdu6437 - Problem L.Videos (最小费用流)
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=6437 题目大意: n个时刻,m个节目,K个人,W为连续看相同类型节目减少的权值 对每个节目,时间段为从 S时 到 T时 ,可以获得w权值,节目类型为op,op只有两种,0和1 同一节目只能允许一个人观看 求所有人权值之和的最大值 题解: 构建 ...原创 2018-10-15 15:23:08 · 202 阅读 · 0 评论