![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
最小生成树
..................
小白程序猿一枚
专注于后端开发
展开
-
HDU 1874 畅通工程续 (Floyd)
某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。Input本题目包含多组数据,请处理到文件结束。每组数据第一行包含两个正整数N和M(0<N<200,0<M&l...原创 2019-07-27 17:10:14 · 69 阅读 · 0 评论 -
POJ1502 - MPI Maelstrom
BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee’s research advi...原创 2019-07-27 16:50:36 · 107 阅读 · 0 评论 -
POJ 1797 Silver Cow Party(Dijkstra)
One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1…N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectional (one-way roa...原创 2019-08-11 15:33:43 · 90 阅读 · 0 评论 -
POJ 2387 Til the Cows Come Home (Dijkstra)
Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get b...原创 2019-07-31 16:55:10 · 69 阅读 · 0 评论 -
POJ1797---Heavy Transportation(Dijkstra的变形)
BackgroundHugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cust...原创 2019-07-27 18:10:29 · 105 阅读 · 0 评论 -
POJ-2253 Frogger (Dijkstra)
. Freddy Frog is sitting on a stone in the middle of a lake. Suddenlyhe notices Fiona Frog who is sitting on another stone. He plans tovisit her, but since the water is dirty and full of tourists’s...原创 2019-07-27 15:42:16 · 138 阅读 · 0 评论 -
POJ 2031 Building a Space Station(Kruscal算法)
You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete the task.The space...原创 2019-08-15 08:56:18 · 144 阅读 · 0 评论 -
HDU1102 Constructing Roads(prim)
You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete the task.The space...原创 2019-08-14 17:51:34 · 81 阅读 · 0 评论 -
POJ2485 Highways(Kruskal算法)
The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already constructed a numb...原创 2019-08-14 17:44:12 · 120 阅读 · 0 评论 -
POJ 3026 Borg Maze(bfs+prim)
The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe the group consciousness of the Borg civilization. E...原创 2019-08-14 17:34:39 · 108 阅读 · 0 评论