排序:
默认
按更新时间
按访问量

最小生成树

#define maxn ??? int father[maxn]; void init() { for(int i=1;i<=n;i++) father[i]=i; } int find(int x) { return x==pre[x]?x:(x=find(pre...

2018-05-24 18:55:45

阅读数:33

评论数:0

Agri-Net

Agri-Net Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 64013   Accepted: 26475 Description ...

2018-02-01 15:26:57

阅读数:54

评论数: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...

2017-12-03 19:39:07

阅读数:78

评论数:0

Out of Hay

Out of Hay Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 18074   Accepted: 7137 Description The cows h...

2017-11-21 18:26:10

阅读数:84

评论数:0

Agri-Net

有n个农场,已知这n个农场都互相相通,有一定的距离,现在每个农场需要装光纤,问怎么安装光纤能将所有农场都连通起来,并且要使光纤距离最小,输出安装光纤的总距离 Input The input includes several cases. For each case, the first lin...

2017-11-21 10:39:15

阅读数:106

评论数:0

天气晴朗的魔法

1640 天气晴朗的魔法 这样阴沉的天气持续下去,我们不免担心起他的健康。 51nod魔法学校近日开展了主题为“天气晴朗”的魔法交流活动。 N名魔法师按阵法站好,之后选取N - 1条魔法链将所有魔法师的魔力连接起来,形成一个魔法阵。 魔法链是做法...

2017-11-20 20:09:45

阅读数:94

评论数: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...

2017-08-04 10:32:09

阅读数:103

评论数: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 numbere...

2017-08-03 21:41:24

阅读数:127

评论数:0

Arctic Network

这道题目我题意理解的有问题,是有卫星的哨所可以和其他有卫星的哨所无阻碍通信,而不是卫星可以作为中继连接两个哨所,所以s颗卫星只能减少s-1条边 The Department of National Defence (DND) wishes to connect several north...

2017-08-03 21:16:53

阅读数:127

评论数:0

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 a...

2017-08-02 16:11:50

阅读数:102

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭