上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 94 下一页

2013年7月12日

2013 ACM/ICPC南京邀请赛B题(求割点扩展)

摘要: 题目链接:http://icpc.njust.edu.cn/Contest/194/Problem/BB - TWO NODES时间限制:10000 MS内存限制:65535 KB问题描述Suppose that G is an undirected graph, and the value of stab is defined as follows:Among the expression, G-i,-jis the remainder after removing node i, node j and all edges that are directly relevant to the 阅读全文

posted @ 2013-07-12 22:44 kuangbin 阅读(865) 评论(0) 推荐(0) 编辑

2013年7月11日

POJ 3177 Redundant Paths POJ 3352 Road Construction

摘要: 这两题是一样的,代码完全一样。就是给了一个连通图,问加多少条边可以变成边双连通。去掉桥,其余的连通分支就是边双连通分支了。一个有桥的连通图要变成边双连通图的话,把双连通子图收缩为一个点,形成一颗树。需要加的边为(leaf+1)/2 (leaf为叶子结点个数)POJ 3177 给定一个连通的无向图G,至少要添加几条边,才能使其变为双连通图。参考:http://blog.csdn.net/lyy289065406/article/details/6762432http://www.cnblogs.com/kuangbin/p/3184889.html#include #include #inclu 阅读全文

posted @ 2013-07-11 19:13 kuangbin 阅读(529) 评论(0) 推荐(0) 编辑

【转】图的割点、桥与双连通分支

摘要: 原文地址:https://www.byvoid.com/blog/biconnect图的割点、桥与双连通分支[点连通度与边连通度]在一个无向连通图中,如果有一个顶点集合,删除这个顶点集合,以及这个集合中所有顶点相关联的边以后,原图变成多个连通块,就称这个点集为割点集合。一个图的点连通度的定义为,最小割点集合中的顶点数。类似的,如果有一个边集合,删除这个边集合以后,原图变成多个连通块,就称这个点集为割边集合。一个图的边连通度的定义为,最小割边集合中的边数。[双连通图、割点与桥]如果一个无向连通图的点连通度大于1,则称该图是点双连通的(point biconnected),简称双连通或重连通。一个 阅读全文

posted @ 2013-07-11 19:12 kuangbin 阅读(1397) 评论(0) 推荐(0) 编辑

POJ 3694 Network (求桥,边双连通分支缩点,lca)

摘要: NetworkTime Limit:5000MSMemory Limit:65536KTotal Submissions:5619Accepted:1939DescriptionA 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 dat 阅读全文

posted @ 2013-07-11 19:06 kuangbin 阅读(1548) 评论(0) 推荐(0) 编辑

UVA 796 - Critical Links (求桥)

摘要: Critical LinksIn a computer network a link L, which interconnects two servers, is considered critical if there are at least two servers A and B such that all network interconnection paths between A and B pass through L. Removing a critical link generates two disjoint sub-networks such that any two s 阅读全文

posted @ 2013-07-11 15:42 kuangbin 阅读(1492) 评论(0) 推荐(0) 编辑

UVA 315 315 - Network(求割点个数)

摘要: NetworkA Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 toN. No two places have the same number. The lines are bidirectional and always connect together two places and in each place the lines end in a telepho 阅读全文

posted @ 2013-07-11 15:40 kuangbin 阅读(2368) 评论(0) 推荐(0) 编辑

2013年7月10日

POJ 1236 Network of Schools (有向图的强连通分量)

摘要: Network of SchoolsTime Limit:1000MSMemory Limit:10000KTotal Submissions:9073Accepted:3594DescriptionA number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it distributes software (the “receiving sc 阅读全文

posted @ 2013-07-10 18:07 kuangbin 阅读(1810) 评论(0) 推荐(0) 编辑

2013年7月7日

【转】有向图强连通分量的Tarjan算法

摘要: 原文地址:https://www.byvoid.com/blog/scc-tarjan/[有向图强连通分量]在有向图G中,如果两个顶点间至少存在一条路径,称两个顶点强连通(strongly connected)。如果有向图G的每两个顶点都强连通,称G是一个强连通图。非强连通图有向图的极大强连通子图,称为强连通分量(strongly connected components)。下图中,子图{1,2,3,4}为一个强连通分量,因为顶点1,2,3,4两两可达。{5},{6}也分别是两个强连通分量。直接根据定义,用双向遍历取交集的方法求强连通分量,时间复杂度为O(N^2+M)。更好的方法是Kosara 阅读全文

posted @ 2013-07-07 16:07 kuangbin 阅读(2722) 评论(0) 推荐(1) 编辑

2013年7月6日

HDU 3072 Intelligence System (强连通分量)

摘要: Intelligence SystemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 982Accepted Submission(s): 440Problem DescriptionAfter a day, ALPCs finally complete their ultimate intelligence system, the purpose of it is of course for ACM ... ...Now, kzc_tc, t 阅读全文

posted @ 2013-07-06 23:34 kuangbin 阅读(740) 评论(0) 推荐(0) 编辑

2013年7月3日

【转】强大的vim配置文件,让编程更随意

摘要: 原文地址:http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html花了很长时间整理的,感觉用起来很方便,共享一下。我的vim配置主要有以下优点:1.按F5可以直接编译并执行C、C++、java代码以及执行shell脚本,按“F8”可进行C、C++代码的调试2.自动插入文件头 ,新建C、C++源文件时自动插入表头:包括文件名、作者、联系方式、建立时间等,读者可根据需求自行更改3.映射“Ctrl + A”为全选并复制快捷键,方便复制代码4.按“F2”可以直接消除代码中的空行5.“F3”可列出当前目录文件,打开树状文件目录6. 支持鼠 阅读全文

posted @ 2013-07-03 23:33 kuangbin 阅读(2488) 评论(0) 推荐(1) 编辑

上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 94 下一页

导航

JAVASCRIPT: