![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最小生成树
文章平均质量分 83
尉水风
这个作者很懒,什么都没留下…
展开
-
Jungle Roads
The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so原创 2017-08-02 16:11:50 · 206 阅读 · 0 评论 -
Agri-Net
Agri-Net Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 64013 Accepted: 26475 Description Farmer John has been elected mayor of his town! On原创 2018-02-01 15:26:57 · 185 阅读 · 0 评论 -
Frogger
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 tourists' sun原创 2017-12-03 19:39:07 · 287 阅读 · 1 评论 -
Out of Hay
Out of Hay Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18074 Accepted: 7137 Description The cows have run out of hay, a horrible event that must be r原创 2017-11-21 18:26:10 · 183 阅读 · 0 评论 -
Agri-Net
有n个农场,已知这n个农场都互相相通,有一定的距离,现在每个农场需要装光纤,问怎么安装光纤能将所有农场都连通起来,并且要使光纤距离最小,输出安装光纤的总距离 Input The input includes several cases. For each case, the first line contains the number of farms, N (3 <= N <= 100).原创 2017-11-21 10:39:15 · 275 阅读 · 0 评论 -
天气晴朗的魔法
1640 天气晴朗的魔法 这样阴沉的天气持续下去,我们不免担心起他的健康。 51nod魔法学校近日开展了主题为“天气晴朗”的魔法交流活动。 N名魔法师按阵法站好,之后选取N - 1条魔法链将所有魔法师的魔力连接起来,形成一个魔法阵。 魔法链是做法成功与否的关键。每一条魔法链都有一个魔力值V,魔法最终的效果取决于阵中所有魔法链的魔力值的和。原创 2017-11-20 20:09:45 · 221 阅读 · 0 评论 -
Arctic Network
这道题目我题意理解的有问题,是有卫星的哨所可以和其他有卫星的哨所无阻碍通信,而不是卫星可以作为中继连接两个哨所,所以s颗卫星只能减少s-1条边 The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different c原创 2017-08-03 21:16:53 · 252 阅读 · 0 评论 -
Bad Cowtractors
最大生成树~ Bessie has been hired to build a cheap internet network among Farmer John's N (2 <= N <= 1,000) barns that are conveniently numbered 1..N. FJ has already done some surveying, and found M (原创 2017-08-03 21:41:24 · 239 阅读 · 0 评论 -
Networking
多组样例的时候,一定要用memset初始化 You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables原创 2017-08-04 10:32:09 · 236 阅读 · 0 评论 -
最小生成树
#define maxn ??? int father[maxn]; void init() { for(int i=1;i<=n;i++) father[i]=i; } int find(int x) { return x==father[x]?x:(x=find(father[x])); } int kruskal(int n,int m) //n个端点,m条边 { in...原创 2018-05-24 18:55:45 · 168 阅读 · 0 评论