POJ 2236:Wireless Network】的更多相关文章

Wireless Network Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 36363   Accepted: 15086 Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap compute…
描述 n台电脑,如果两台电脑间的距离的d范围内,则两台电脑能够连通. 如果AB连通,BC连通,则认为AC连通. 已知电脑台数N,最大距离d,以及每个电脑的坐标.有如下两种操作: O i 表示修复编号为i的电脑 S i j 表示判断电脑ij能否连通. 对每一个S操作,如果电脑ij能连通,输出SUCCESS,否则输出FAIL 思路 典型的并查集. 初始:每个点的父节点都是自身   每修复一个点,让所有能与这个点连通的点的根节点都指向这个点的根节点 每查询两个点,取得它们的根节点,判断是否相同,如果相…
Wireless Network 这接翻译了 Descriptions 地震发生在东南亚.ACM(亚洲合作医疗团队)已经与膝上电脑建立了无线网络,但是一次意外的余震袭击,网络中的所有计算机都被打破了.计算机一个接一个地修复,网络逐渐开始工作.由于硬件限制,每台计算机只能直接与距离它不远的计算机进行通信.但是,每台计算机都可以被视为两台其他计算机之间通信的中介,也就是说,如果计算机A和计算机B可以直接通信,或者计算机C可以与A和A进行通信,则计算机A和计算机B可以进行通信. B. 在修复网络的过程…
Wireless Network Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 39772   Accepted: 16479 题目链接:http://poj.org/problem?id=2236 Description: An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a…
http://poj.org/problem?id=1459 题意:有np个发电站,nc个消费者,m条边,边有容量限制,发电站有产能上限,消费者有需求上限问最大流量. 思路:S和发电站相连,边权是产能上限,消费者和T相连,边权是需求上限,边的话就按题意加就好了.难点更觉得在于输入..加个空格..边数组要*2,因为有反向边. #include <cstdio> #include <algorithm> #include <iostream> #include <cs…
Power Network Time Limit: 2000MS   Memory Limit: 32768K Total Submissions: 25414   Accepted: 13247 Description A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied…
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&…
Wireless Network Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 25022   Accepted: 10399 Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap compute…
Wireless Network Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 16065   Accepted: 6778 Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computer…
Wireless Network 题目链接: http://acm.hust.edu.cn/vjudge/contest/123393#problem/A Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aft…