题目链接:https://vjudge.net/problem/POJ-3694 A 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 d…
题目链接:http://poj.org/problem?id=3177 Redundant Paths Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15852 Accepted: 6649 Description In order to get from one of the F (1 <= F <= 5,000) grazing fields (which are numbered 1..F) to anoth…
http://poj.org/problem?id=2186 Popular Cows Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 20191 Accepted: 8193 Description Every cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you…
题目描述 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. The cows are now tired of often being forced to t…
/*这道题是没有重边的,求加几条边构成双联通,求边联通分量,先求出桥然后缩点,成一个棵树 找叶子节点的个数*/ #include<stdio.h>//用容器写在3177这个题上会超内存,但是用临界表过了 #include<string.h>/*此代码为临界表代码*/ #define N 5100 struct node { int u,v,next; }bian[N*4]; int dfn[N],low[N],index,f[N*4],n,head[N],yong; int Min…
http://poj.org/problem?id=1236 Network of Schools Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 9481 Accepted: 3767 Description A number of schools are connected to a computer network. Agreements have been developed among those schoo…