![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
cwb丶
这个作者很懒,什么都没留下…
展开
-
tarjan求割点
发现之前的求割点模板有问题 ,新整理一份#include<cstdio>#include<cstring>#include<algorithm>#define N 1001using namespace std;int n,id,tot;int dfn[N],low[N];bool cutpoint[N];int front[N],to[2...原创 2020-04-20 19:29:25 · 182 阅读 · 0 评论 -
Educational Codeforces Round 72 (Rated for Div. 2)D. Coloring Edges(想法)
D. Coloring Edgestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a directed graph withnnvertices andmmdirected ...原创 2019-09-06 19:26:52 · 220 阅读 · 0 评论 -
最短路 2 (百度之星 初赛3 B)(floyd)
小 A 是社团里的工具人,有一天他的朋友给了他一个nn个点,mm条边的正权连通无向图,要他计算所有点两两之间的最短路。作为一个工具人,小 A 熟练掌握着 floyd 算法,设w[i][j]w[i][j]为原图中(i,j)(i,j)之间的权值最小的边的权值,若没有边则w[i][j]=w[i][j]=无穷大。特别地,若i=ji=j,则w[i][j]=0w[i][j]=0。F...原创 2019-08-26 18:58:12 · 257 阅读 · 0 评论 -
path(优先队列,dijk拓展)
Problem DescriptionYou have a directed weighted graph withnvertexes andmedges. The value of a path is the sum of the weight of the edges you passed. Note that you can pass any edge any times and...原创 2019-08-26 18:42:00 · 267 阅读 · 0 评论 -
二分图性质
判断一个二分图的充要条件就是没有奇数环我们可以根据该图中是否存在奇数环来判定该图是否可以构成二分图其实只要把二分图想象成是一个染色问题同一条边的两个点不为同种颜色 就不难证明没有奇数环是构成二分图的充分必要条件...原创 2019-08-09 09:45:32 · 245 阅读 · 0 评论 -
Ombrophobic Bovines (二分 + 弗罗伊得+最大流 )
FJ's cows really hate getting wet so much that the mere thought of getting caught in the rain makes them shake in their hooves. They have decided to put a rain siren on the farm to let them know when ...原创 2019-08-08 16:52:45 · 136 阅读 · 0 评论 -
2019东北赛补题之(E. Minimum Spanning Tree)贪心(伪最小生成树)
E. Minimum Spanning Treetime limit per test2.0 smemory limit per test512 MBinputstandard inputoutputstandard outputIn the mathematical discipline of graph theory, the line graph of a...原创 2019-05-29 18:04:43 · 1119 阅读 · 8 评论 -
E - Redundant Paths POJ - 3177 (边的双联通分量缩点 极大双联通分量子图)
In order to get from one of the F (1 <= F <= 5,000) grazing fields (which are numbered 1..F) to another field, Bessie and the rest of the herd are forced to cross near the Tree of Rotten Apples....原创 2019-05-01 15:26:30 · 133 阅读 · 0 评论 -
2019浙江省赛j welcome Party
The 44th World Finals of the International Collegiate Programming Contest (ICPC 2020) will be held in Moscow, Russia. To celebrate this annual event for the best competitive programmers around the wor...原创 2019-04-28 09:42:45 · 411 阅读 · 0 评论 -
dijk的堆优化(链式前向星存图)(结构体运算符重载)(小根堆对结构体的排序)
#include<cstdio>#include<algorithm>#include<queue>#include<string>#include<iostream>#include<list>#include<stack>#include<deque>#include原创 2019-03-13 09:26:25 · 441 阅读 · 0 评论 -
东北农业大学积分赛第一场(b题) the sum of vaule(dfs序+邻接表存图+线段树+单点更新)
dfs序处理的一类问题为查询子树权值和在这里第一次使用了临界表存图邻接表适用于稀疏图 对于重边自环问题可以代替临界矩阵#include<cstdio>#include<vector>#include<cstring>#include<iostream>using namespace std;struct node1//´æÊ÷...原创 2019-03-09 17:15:04 · 89 阅读 · 0 评论