ICPC图论:最小生成树
文章平均质量分 90
图论中,有关最小生成树的题解
海岛Blog
专注于程序设计及其竞赛,专注于集成电路EDA设计
展开
-
Aizu2224 Save your cats【Kruscal算法+最大生成树】
Problem C: Save your catsNicholas Y. Alford was a cat lover. He had a garden in a village and kept many cats in his garden. The cats were so cute that people in the village also loved them.One day, an evil witch visited the village. She envied the cats f原创 2021-08-11 23:33:20 · 235 阅读 · 0 评论 -
UVA11603 Its all about the Bandwidth【Kruskal算法】
... it is important to realize that any lock can be picked with a big enough hammer.Sun System & Network Admin ManualMy appartment has n computers. My friend’s appartment also has n computers. In each appartment, some pairs of computers are connect.原创 2021-03-14 12:07:36 · 193 阅读 · 0 评论 -
UVA10099 The Tourist Guide【Kruskal算法】
Mr. G. works as a tourist guide. His current assignment is to take some tourists from one city to another. Some two-way roads connect the cities. For each pair of neighboring cities there is a bus service that runs only between those two cities and uses th原创 2021-03-09 03:53:26 · 326 阅读 · 0 评论 -
POJ3723 Conscription【Kruskal算法】
ConscriptionTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 23708 Accepted: 8002DescriptionWindy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wants to collect them to be his so原创 2021-03-08 06:08:38 · 341 阅读 · 0 评论 -
UVA1174 LA3988 ZOJ3036 IP-TV【Kruskal算法+Prim算法】
IP-TVTime Limit: 5000 msMemory Limit: 32768 KBA consortium of European Internet providers manages a large backbone network, with direct links (connections) between a large number of European cities. A link between a pair of cities is bidirectional. The t原创 2021-03-03 05:55:35 · 313 阅读 · 0 评论 -
UVA11857 HDU3742 Driving Range【最小生成树+Kruskal算法】
These days, many carmakers are developing cars that run on electricity instead of gasoline. The batteries used in these cars are generally very heavy and expensive, so designers must make an important...原创 2020-04-01 17:18:39 · 386 阅读 · 0 评论 -
UVA11747 Heavy Cycle Edges【最小生成树+Kruskal算法】
Given an undirected graph with edge weights, a minimum spanning tree is a subset of edges of minimum total weight such that any two nodes are connected by some path containing only these edges. A popu...原创 2020-04-01 11:25:44 · 329 阅读 · 1 评论 -
UVA11733 Airports【最小生成树+Kruskal算法】
The government of a certain developing nation wants to improve transportation in one of its most inaccessible areas, in an attempt to attract investment. The region consists of several important locat...原创 2020-04-01 10:53:56 · 391 阅读 · 0 评论 -
UVA11710 Expensive subway【最小生成树+Kruskal算法】
Peter lives in Expensive City, one of the most expensive cities in the world. Peter has not got enough money to buy a car, and the buses in Expensive City are pretty bad, so he uses the subway to go t...原创 2020-04-01 00:32:07 · 347 阅读 · 0 评论 -
UVA11228 Transportation system.【最小生成树+Kruskal算法】
In the country of Graphland, there are many cities but no roads. The federal government wants to change this situation and plans to build roads and railroads such that all the cities in the country ar...原创 2020-03-31 23:35:15 · 334 阅读 · 0 评论 -
UVA1235 LA4138 Anti Brute Force Lock【最小生成树+Kruskal算法】
Lately, there is one serious problem with Panda Land Safe Box: several safes have been robbed! The safes are using old 4-digits rolling lock combination (you only have to roll the digit, either up or ...原创 2020-03-31 22:44:23 · 666 阅读 · 0 评论 -
UVA1208 LA3171 Oreon【最小生成树+Kruskal算法】
OreonTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2245 Accepted: 596DescriptionIn the 25th century, civilization is struck by a series of calamities that eventually led mankind to b...原创 2020-03-30 13:33:57 · 398 阅读 · 0 评论 -
HDU5627 Clarke and MST【Kruscal算法+并查集】
Clarke and MSTTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 829 Accepted Submission(s): 478Problem DescriptionClarke is a patient with ...原创 2020-03-25 23:39:44 · 513 阅读 · 1 评论 -
HDU4750 Count The Pairs【Kruscal算法+并查集】
Count The PairsTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 1722 Accepted Submission(s): 760Problem DescriptionWith the 60th anniver...原创 2020-03-25 22:38:13 · 268 阅读 · 0 评论 -
HDU1598 find the most comfortable road【枚举+并查集+最大生成树】
find the most comfortable roadTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10784 Accepted Submission(s): 4506Problem DescriptionXX星有许多...原创 2020-03-13 14:47:18 · 220 阅读 · 0 评论 -
HDU3367 Pseudoforest【最大生成伪森林+变形Kruskal算法】
PseudoforestTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 3998 Accepted Submission(s): 1595Problem DescriptionIn graph theory, a pseud...原创 2020-03-12 12:35:31 · 261 阅读 · 0 评论 -
UVA11631 HDU2988 Dark roads【最小生成树+Kruskal算法】
Dark roadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1519 Accepted Submission(s): 664Problem DescriptionEconomic times these days ar...原创 2020-03-08 18:56:51 · 321 阅读 · 0 评论 -
HDU1875 畅通工程再续【Kruskal算法+并查集】
畅通工程再续Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 35029 Accepted Submission(s): 11633 Problem Description相信大家都听说一个“百岛湖”的地方吧,百岛湖的居...原创 2018-07-18 23:22:05 · 605 阅读 · 0 评论 -
UVA1151 UVALive3505 Buy or Build【Kruskal算法+并查集+枚举】
Buy or BuildTime Limit: 2000MS Memory Limit: 65536K Total Submissions: 1824 Accepted: 683 DescriptionWorld Wide Networks (WWN) is a leading company that operates large telecomm...原创 2018-07-18 00:42:12 · 369 阅读 · 0 评论 -
POJ2784 Buy or Build【Kruskal算法+并查集+枚举】
Buy or BuildTime Limit: 2000MS Memory Limit: 65536K Total Submissions: 1824 Accepted: 683 DescriptionWorld Wide Networks (WWN) is a leading company that operates large telecomm...原创 2018-07-17 23:40:21 · 902 阅读 · 0 评论 -
POJ3522 UVA1395 UVALive3887 Slim Span【Kruskal算法+并查集+枚举】
Slim SpanTime Limit: 5000MS Memory Limit: 65536K Total Submissions: 9425 Accepted: 5014 DescriptionGiven an undirected weighted graph G, you should find one of spanning trees s...原创 2018-07-17 21:45:15 · 401 阅读 · 0 评论 -
HDU1879 继续畅通工程【Kruskal算法+并查集】
继续畅通工程Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 26913 Accepted Submission(s): 11362Problem Description 省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通...原创 2017-02-27 00:28:33 · 2103 阅读 · 0 评论 -
HDU1863 畅通工程【Kruskal算法+并查集】
畅通工程Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 33818Accepted Submission(s): 14964Problem Description 省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但...原创 2017-02-27 08:57:49 · 1535 阅读 · 0 评论 -
POJ1861 ZOJ1542 Network【Kruskal算法+并查集】
NetworkTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 17853 Accepted: 7206 Special JudgeDescriptionAndrew is working as system administrator and is planning to establish a new network in hi...原创 2018-06-22 21:52:46 · 428 阅读 · 0 评论 -
POJ2560 ZOJ1872 Freckles【Kruskal算法+并查集】
FrecklesTime Limit:1000MSMemory Limit:65536KTotal Submissions:8998Accepted:4271DescriptionIn an episode of the Dick Van Dyke show, little Richie connects the freckles on his Dad's back to form a...原创 2018-06-22 23:07:19 · 508 阅读 · 0 评论 -
UVA10034 Freckles【Kruskal算法+并查集】
In an episode of the Dick Van Dyke show, little Richie connects the freckles on his Dad’s back to form a picture of the Liberty Bell. Alas, one of the freckles turns out to be a scar, so his Ripley’s ...原创 2018-06-22 23:22:34 · 478 阅读 · 0 评论 -
POJ2421 HDU1102 Constructing Roads【Kruskal算法+并查集】
Constructing RoadsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 27045 Accepted: 11893DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such t...原创 2018-06-24 07:49:24 · 378 阅读 · 0 评论 -
POJ1258 Agri-Net【Kruskal算法+并查集】
Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 66726 Accepted: 27640DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet con...原创 2018-06-24 17:27:04 · 508 阅读 · 0 评论 -
POJ1789 ZOJ2158 Truck History【Kruskal算法+并查集】
Truck HistoryTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 32258 Accepted: 12562DescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable ...原创 2018-06-24 18:15:44 · 412 阅读 · 1 评论 -
POJ2485 Highways【Kruskal算法+并查集】
HighwaysTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 35689 Accepted: 15997DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So th...原创 2018-06-24 22:15:29 · 499 阅读 · 0 评论 -
UVA908 Re-connecting Computer Sites【Kruskal算法+并查集】
Consider the problem of selecting a set T of high-speed lines for connecting N computer sites, from a universe of M high-speed lines each connecting a pair of computer sites. Each high-speed line has ...原创 2018-06-24 22:57:30 · 475 阅读 · 0 评论 -
HDU3371 Connect the Cities【Kruskal算法+并查集】
Connect the CitiesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 24232 Accepted Submission(s): 5527Problem DescriptionIn 2100, since the sea...原创 2018-06-29 14:46:46 · 438 阅读 · 0 评论 -
POJ2349 ZOJ1914 UVA10369 Arctic Network【Kruskal算法+并查集】
Arctic NetworkTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 25651 Accepted: 7884DescriptionThe Department of National Defence (DND) wishes to connect several northern outposts by a wireles...原创 2018-06-26 10:06:29 · 392 阅读 · 0 评论 -
POJ2377 Bad Cowtractors【Kruskal算法+并查集+最大生成树】
Bad CowtractorsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17907 Accepted: 7237DescriptionBessie has been hired to build a cheap internet network among Farmer John's N (2 <= N <= 1...原创 2018-07-08 19:31:12 · 579 阅读 · 0 评论 -
POJ2395 Out of Hay【Kruskal算法+并查集】
Out of HayTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 19362 Accepted: 7592DescriptionThe cows have run out of hay, a horrible event that must be remedied immediately. Bessie intends to v...原创 2018-07-08 19:46:11 · 397 阅读 · 0 评论 -
HDU1162 Eddy's picture【Kruskal算法+并查集】
Eddy's pictureTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11842 Accepted Submission(s): 5923Problem DescriptionEddy begins to like painti...原创 2018-07-02 18:09:59 · 436 阅读 · 0 评论 -
HDU4313 Matrix【Kruskal算法+并查集】
MatrixTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3532 Accepted Submission(s): 1401Problem DescriptionMachines have once again attacked t...原创 2018-07-03 05:40:23 · 411 阅读 · 0 评论 -
POJ1251 ZOJ1406 HDU1301 UVALive2539 Jungle Roads【Kruskal算法+并查集】
Jungle RoadsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 30648 Accepted: 14347DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was...原创 2018-06-28 15:29:34 · 511 阅读 · 0 评论 -
HDU1233 还是畅通工程【Kruskal算法+并查集】
还是畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 51751 Accepted Submission(s): 23482Problem Description 某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省...原创 2017-02-27 09:23:15 · 1733 阅读 · 0 评论