ZOJ 1967 POJ 2570 Fiber Network】的更多相关文章

枚举起点和公司,每次用DFS跑一遍图,预处理出所有的答案.询问的时候很快就能得到答案. #include<cstdio> #include<cmath> #include<cstring> #include<vector> #include<algorithm> using namespace std; ][][]; ][][]; ]; vector<]; int n; int S,T,G; void DFS(int now) { ans[…
题目翻译 一些公司决定搭建一个更快的网络.称为"光纤网". 他们已经在全世界建立了很多网站.这 些网站的作用类似于路由器.不幸的是,这些公司在关于网站之间的接线问题上存在争论,这样"光纤网"项目就被迫终止了,留下的是每一个公司自己在某些网站之间铺设的线路. 如今,Internet 服务供应商.当想从网站 A传送数据到网站 B,就感到困惑了.究竟哪个公司 可以提供必要的连接. 请帮助供应商回答他们的查询.查询全部可以提供从网站 A到站定 B的线 路连接的公司. 输入描…
Description Several startup companies have decided to build a better Internet, called the "FiberNet". They have already installed many nodes that act as routers all around the world. Unfortunately, they started to quarrel about the connecting li…
#include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int mp[30][250][250]; int main() { int n,u,v,i,j,l,k,p,f; char s[1024]; while(~scanf("%d",&n)) { if(n==0) break; memset(mp,0,sizeof(mp)); while(~…
Fiber Network Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3328   Accepted: 1532 Description Several startup companies have decided to build a better Internet, called the "FiberNet". They have already installed many nodes that ac…
题目连接:problemId=542" target="_blank">ZOJ 1542 POJ 1861 Network 网络 Network Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Andrew is working as system administrator and is planning to establish a new network in his com…
POJ 1459 Power Network / HIT 1228 Power Network / UVAlive 2760 Power Network / ZOJ 1734 Power Network / FZU 1161 (网络流,最大流) Description A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A…
[POJ 3694] Network(割边+LCA) Network Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 7971   Accepted: 2902 Description A network administrator manages a large network. The network consists of N computers and M links between pairs of comput…
POJ 2236 Wireless Network http://poj.org/problem?id=2236 题目大意: 给你N台损坏的电脑坐标,这些电脑只能与不超过距离d的电脑通信,但如果x和y均能C通信,则x和y可以通信.现在给出若干个操作, O p 代表修复编号为p的电脑 S p q代表询问p和q是不是能通信. 思路: 并查集即可.. 如果修复了一台电脑,则把与它相连距离不超过d的且修复了的放在一个集合里面. #include<cstdio> #include<cstring&…
题意就是 给你 n个点 m条边 每条边有些公司支持 问 a点到b点的路径有哪些公司可以支持 这里是一条路径中要每段路上都要有该公司支持 才算合格的一个公司// floyd 加 位运算// 将每个字符当成二进制中的一位就好#include <iostream> #include <map> #include <algorithm> #include <queue> #include <math.h> #include <stdio.h>…