P2746 [USACO5.3]校园网Network of Schools// POJ1236: Network of Schools 题目描述 一些学校连入一个电脑网络.那些学校已订立了协议:每个学校都会给其它的一些学校分发软件(称作“接受学校”).注意即使 B 在 A 学校的分发列表中, A 也不一定在 B 学校的列表中. 你要写一个程序计算,根据协议,为了让网络中所有的学校都用上新软件,必须接受新软件副本的最少学校数目(子任务 A).更进一步,我们想要确定通过给任意一个学校发送新软件,这个…
Corporative Network A very big corporation is developing its corporative network. In the beginning each of the N enterprisesof the corporation, numerated from 1 to N, organized its own computing and telecommunication center.Soon,…
Network of Schools Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 27121 Accepted: 10704 Description A number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a l…
Communication 题目描述 The Ministry of Communication has an extremely wonderful message system, designed by the President himself. For maximum efficiency, each office in the Ministry can send a message directly to some, but not necessarily all, other off…
Network Description Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the company, they can be connected to each other using cables. Since each worker of the company must have…
Network of Schools Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 5354 Accepted: 2106 Description A number of schools are connected to a computer network. Agreements have been developed…
Network of Schools Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 16343 Accepted: 6484 Description A number of schools are connected to a computer network. Agreements have be…
Network of Schools 题意:若干个学校组成一个计算机网络系统,一个学校作为出发端连接着若干个学校,信息可以传送到这些学校.被链接的学校不需要再次与出发端相连,现在问你:A:最少选几个学校作为出发端其他所有的学校都能接收到信息,B:如果任意选一个学校作为出发端使得其他所有学校都能接收到信息,最少需要再搭建几条网线. 思路:用Tarjan算法求出所有的连通分量,然后将这些分量作为一个点进行连接(缩点).答案A既是入度为0的点的数量,答案B:一条网线可以作为一个出度和一个入度,所以答案…
题目链接:http://poj.org/problem?id=1236 Network of Schools Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 19859 Accepted: 7822 Description A number of schools are connected to a computer network. Agreements have been developed among those…
#include<iostream> #include<vector> #include<string> #include<cmath> #include<algorithm> #include<cstdio> #include<cstring> using namespace std; int n, d; ][]; struct Point { double x, y; }cur[]; ]; int findRoot(i…
题意:一个企业要去收购一些公司把,使的每个企业之间互联,刚开始每个公司互相独立 给出n个公司,两种操作 E I:询问I到I它连接点最后一个公司的距离 I I J:将I公司指向J公司,也就是J公司是I公司的上级,距离为abs(I-J)%1000(貌似G++不支持abs,PE了两发) 思路:转化一下题意就行了,首先刚开始的时候每个公司都是独立的,I操作就是并查集中合并操作,将I这课树并到J这个树上, E操作要求的东西就是 I到I的根节点的距离,先看一个没有路径压缩直接暴力的方法把.(本以为不会过的,…
It's not Floyd Algorithm 时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte 描述 When a directed graph is given, we can solve its transitive closure easily using the well-known Floyd algorithm. But if you're given a transitive closure, can you give a…
A 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 schools”). Note that if B is in the distribution lis…
Corporative Network Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 3945 Accepted: 1416 Description A very big corporation is developing its corporative network. In the beginning each of the N enterprises of the corporation, numerated…
Wireless Network Time Limit: 10000MS Memory Limit: 65536K Total Submissions: 22107 Accepted: 9285 Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computer…