POJ2349 Arctic Network】的更多相关文章

[Poj2349]Arctic Network Description 国防部(DND)要用无线网络连接北部几个哨所.两种不同的通信技术被用于建立网络:每一个哨所有一个无线电收发器,一些哨所将有一个卫星频道. 任何两个有卫星信道的哨所可以通过卫星进行通信,而不管他们的位置.同时,当两个哨所之间的距离不超过D时可以通过无线电通讯,D取决于对收发器的功率.功率越大,D也越大,但成本更高.出于采购和维修的方便,所有哨所的收发器必须是相同的:那就是说,D值对每一个哨所相同. 你的任务是确定收发器的D的最…
Arctic Network Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 17758   Accepted: 5646 Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication tec…
Arctic Network Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 19113   Accepted: 6023 Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication tec…
Arctic Network Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 16968   Accepted: 5412 Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication tec…
2017-08-04 16:19:13 writer:pprp 题意如下: Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every o…
http://poj.org/problem?id=2349 Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every outpost…
原题链接 先随便找一棵最小生成树,然后贪心的从大到小选择边,使其没有贡献. 显然固定生成树最长边的一个端点安装卫星频道后,从大到小选择边的一个端点作为卫星频道即可将该边的贡献去除. 所以最后的答案就是最小生成树上第\(m\)长的边. #include<cstdio> #include<algorithm> #include<cmath> #include<cstring> using namespace std; const int N = 510; str…
Arctic Network Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 28311   Accepted: 8570 题目链接:http://poj.org/problem?id=2349 Description: The Department of National Defence (DND) wishes to connect several northern outposts by a wireless net…
Arctic Network Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9557   Accepted: 3187 Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication tech…
Arctic Network Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2349 Appoint description:  System Crawler  (2015-06-01) Description The Department of National Defence (DND) wishes to connect seve…
Arctic Network 题目链接: http://acm.hust.edu.cn/vjudge/contest/124434#problem/F Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be use…
http://poj.org/problem?id=2349 Arctic Network Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 12544   Accepted: 4097 Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network.…
Arctic Network The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every outpost will have a radio transceive…
G - Arctic Network   #include<cmath> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #define MAXN 510 using namespace std; double an; int fa[MAXN]; int t,n,m,tot,sum; double x[MAXN],y[MAXN],ans[MAXN]…
在北极圈有一些基地,这些基地需要建立通讯网络,他们可以通过卫星直接通信或者无线通信,基地有S个卫星,N个基地,不过无线通信的传输距离是D,距离越远费用越高,现在想知道D最小是多少. 分析:使用krusal添加p-s条边就行了,因为剩下的边肯定会比已经添加的边要长,在添加的边里面选取最长的那条,也就是最后添加的那条. ************************************************************************************ #inclu…
[题意] 南极有n个科研站, 要把这些站用卫星或者无线电连接起来,使得任意两个都能直接或者间接相连.任意两个都有安装卫星设备的,都可以直接通过卫星通信,不管它们距离有多远. 而安装有无线电设备的两个站,距离不能超过D. D越长费用越多. 现在有s个卫星设备可以安装,还有足够多的无线电设备,求一个方案,使得费用D最少(D取决与所有用无线电通信的花费最大的那条路径). InputThe first line of input contains N, the number of test cases.…
poj2349:http://poj.org/problem?id=2349 题意:有卫星电台的城市之间可以任意联络.没有卫星电台的城市只能和距离小于等于D的城市联络.告诉你卫星电台的个数S,让你求最小的D. 题解: 生成最小生成树,去掉最长的S条边后,剩下最长的边就是D.也就是求最小生成树中第S+1长的边. #include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #…
题目链接: https://vjudge.net/problem/POJ-2349 题目大意: 要在n个节点之间建立通信网络,其中m个节点可以用卫星直接连接,剩下的节点都要用线路连接,求剩下这些线路中最大的长度需要多长 思路: 还是MST的裸题,由于有m个节点可以用卫星连接,所以求出MST后,最长的m-1条边都可以用卫星连接,只需要求出第m长的边即可,直接用prim算法,保存mst每条边的长度,排序后直接输出第m长的边. #include<iostream> #include<cstdi…
描述 The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every outpost will have a radio transceiver and some o…
题目链接:http://poj.org/problem?id=2349 Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every out…
链接: http://poj.org/problem?id=2349 Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 13715   Accepted: 4424 Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two differe…
The Department of National Defence(DND)wishestoconnectseveral northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every outpost will have a radio transceiver and some outposts…
Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 25165   Accepted: 7751 Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are t…
Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every outpost will have a radio transceiver a…
The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every outpost will have a radio transceiver and some outp…
/* The first line of each test case contains 1 <= S <= 100, the number of satellite channels! 注意:S表示一共有多少个卫星,那么就是有 最多有S-1个通道! 然后将最小生成树中的后边的 S-1通道去掉就行了! 思路:最小生成树中的第 k 个最小边! */ //克鲁斯克尔算法..... #include<iostream> #include<cstdio> #include<…
题目 /*********题意解说——来自discuss——by sixshine**************/ 有卫星电台的城市之间可以任意联络.没有卫星电台的城市只能和距离小于等于D的城市联络.题目告诉你卫星电台的个数S,让你求最小的D. 做最小生成树,去掉最长的S条边后,剩下最长的边就是D. 也就是求最小生成树中第S+1长的边. 完毕. /********************************************************/ //听说听木看懂之后,数据很水,果然…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1914 http://poj.org/problem?id=2349 题目大意,给定一些点的坐标,求MST,然后要求求去掉最大的k条边后,最大的边 直接Prim,然后在排序即可. 小技巧是一开始不求平方根,最后输出的时候在求出平方根即可. ZOJ上排行第三,不过在POJ就被虐了... #include<cstdio> #include<cmath> #incl…
题意: 有许多基地,每个基地都有两种收发信号的方式,一种是通过无线电收发机,另一种是通过卫星.两个基地之间可以通过卫星交流不管它们相距多远:但是通过无线电交流,就要求它们的距离不超过D.为了方便布置,节省成本,每个基地的无线电交流的最大距离都相等.给出基地的位置和卫星的数量,求出D,保证两个基地之间至少一个交流路径. 思路: 求出MST,保证了两点之间有路径,然后按照从大到小的顺序给在生成树中的边排序,将卫星安排给权值大的边,保证D尽可能小.s个卫星可以安排给s-1条边(s个点),所以第s条边的…
题目大意:n个村庄的坐标已知,现在要架光纤使所有的村庄都能上网,但受光纤的参数d所限,每根光纤只能给距离不超过d的村庄之间连接.但是有s个信号机,信号机之间能无限畅连.考虑到光纤的价格和参数d有关,现在要确定最小的参数. 题目分析:最好的方案当然是把s个信号机都用上,这就相当于在一张必选s-1条边(边长视为为0)的无向图中构建最小生成树,答案为树中最长的边长.不过,必选哪s-1条边是不确定的. 代码如下: # include<iostream> # include<cstdio>…