随笔分类 - 图论割点,桥,强连通双联通
摘要:赤裸裸的最短路,需要注意下枚举过程就好了。直接贴上别人的代码,发现他的代码挺符合我的风格,以后就这样写了。#includeusingnamespacestd;structnode{inty,z,id;node(){}node(inty,intz,intid):y(y),z(z),id(id){}};...
阅读全文
摘要:KingdomProblem DescriptionTeacher Mai has a kingdom consisting of n cities. He has planned the transportation of the kingdom. Every pair of cities has...
阅读全文
摘要:const int MAX = 1e6+10;const int inf = 0x3f3f3f3f;int n,m;int lx[MAX],ly[MAX];int match[MAX];int usex[MAX],usey[MAX];int w[MAX][MAX];int find(int u) {...
阅读全文
摘要:Graphic SequenceA graphic sequence is a sequence of numbers which can be thedegree sequenceof somegraph. A sequence can be checked to determine if it ...
阅读全文
摘要:DescriptionA network administrator manages a large network. The network consists of N computers and M links between pairs of computers. Any pair of computers are connected directly or indirectly by successive links, so data can be transformed between any two computers. The administrator finds that s
阅读全文
摘要:Road ConstructionTime Limit:2000MSMemory Limit:65536KTotal Submissions:7980Accepted:4014DescriptionIt's almost summer time, and that means that it's almost summer construction time! This year, the good people who are in charge of the roads on the tropical island paradise of Remote Island wou
阅读全文
摘要:by :Tsaidhttp://blog.csdn.net/tsaid/article/details/6877404[点连通度与边连通度]在一个无向连通图中,如果有一个顶点集合,删除这个顶点集合,以及这个集合中所有顶点相关联的边以后,原图变成多个连通块,就称这个点集为割点集合。一个图的点连通度的定义为,最小割点集合中的顶点数。类似的,如果有一个边集合,删除这个边集合以后,原图变成多个连通块,就称这个点集为割边集合。一个图的边连通度的定义为,最小割边集合中的边数。[双连通图、割点与桥]如果一个无向连通图的点连通度大于1,则称该图是点双连通的(point biconnected),简称双连通或重
阅读全文
摘要:Popular CowsTime Limit:2000MSMemory Limit:65536KTotal Submissions:21823Accepted:8900DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 3#include4#include5#include6usingnamespacestd;7constintMAX=50000+10;8intvis[MAX];intsccno[MAX];9vectorG[MAX],vs,RG[MAX
阅读全文