最小生成树
superxtong
浮点猫
展开
-
UVA12507
题目链接 http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2027&pid=5 题意就是让首都和其他城市连接起来,在花费不超过K的情况下使得人数最大。看了别人的才懂的= =代码如下://prim算法求最小生成树 #include <cstdio> #include <cstring> #include <algorithm> #include <原创 2016-05-13 21:25:04 · 248 阅读 · 0 评论 -
C - Arctic Network
Description 国防部(DND)要用无线网络连接北部几个哨所。两种不同的通信技术被用于建立网络:每一个哨所有一个无线电收发器,一些哨所将有一个卫星频道。 任何两个有卫星信道的哨所可以通过卫星进行通信,而不管他们的位置。同时,当两个哨所之间的距离不超过D时可以通过无线电通讯,D取决于对收发器的功率。功率越大,D也越大,但成本更高。出于采购和维修的方便,所有哨所的收发器必须是相同的;那就是说原创 2016-07-12 19:51:17 · 359 阅读 · 0 评论 -
E - Frogger
Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of t原创 2016-07-13 00:06:46 · 361 阅读 · 0 评论