
数据结构_并查集
SCUT_Pein
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ1611--The Suspects--并查集裸题
Description Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best原创 2013-02-02 19:54:55 · 548 阅读 · 0 评论 -
POJ2513--Colored Sticks
Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a straight line such that the colors of the endpoints原创 2013-03-21 09:49:42 · 877 阅读 · 0 评论 -
LA 3644 并查集
A secret service developed a new kind of explosive that attain its volatile property only when a specific association of products occurs. Each product is a mix of two different simple compounds, to wh原创 2014-02-19 18:15:00 · 764 阅读 · 0 评论 -
LA 3027 并查集
A very big corporation is developing its corporative network. In the beginning each of the N enterprises of the corporation, numerated from 1 to N, organized its own computing and telecommunication ce原创 2014-02-19 18:54:29 · 669 阅读 · 0 评论 -
UVa 11987,Almost Union-Find,并查集
I hope you know the beautiful Union-Find structure. In this problem, you're to implement something similar, but not identical. The data structure you need to write is also a collection of disjoint se原创 2014-02-28 21:04:18 · 761 阅读 · 0 评论 -
HDU3367--Pseudoforest
Problem Description In graph theory, a pseudoforest is an undirected graph in which every connected component has at most one cycle. The maximal pseudoforests of G are the pseudoforest subgraphs of G原创 2013-04-15 12:14:32 · 921 阅读 · 0 评论 -
POJ2492--A Bug's Life--并查集
Description Background Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the原创 2013-03-28 18:41:03 · 808 阅读 · 0 评论 -
HDU3172--Virtual Friends
Problem Description These days, you can do all sorts of things online. For example, you can use various websites to make virtual friends. For some people, growing their social network (their friends,原创 2013-04-11 14:17:10 · 857 阅读 · 0 评论 -
HDU1213--How Many Tables
Problem Description Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the frien原创 2013-04-10 23:47:58 · 894 阅读 · 0 评论 -
POJ1703--Find them, Catch them--并查集
Description The police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to ide原创 2013-03-28 18:01:13 · 921 阅读 · 0 评论 -
HDU1198--Farm Irrigation
Problem Description Benny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in these squares. Different square has原创 2013-04-11 10:10:52 · 762 阅读 · 0 评论 -
HDU1856--More is better
Problem Description Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements.原创 2013-04-11 00:45:25 · 739 阅读 · 0 评论 -
HDU1232--畅通工程
Problem Description 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( < 1000原创 2013-04-10 23:49:28 · 695 阅读 · 0 评论 -
Is It A Tree?--POJ1308--并查集
Description A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following proper原创 2013-03-20 11:43:05 · 823 阅读 · 0 评论 -
UVA11987--Almost Union-Find--带权并查集
Description I hope you know the beautiful Union-Find structure. In this problem, you're to implement something similar, but not identical. The data structure you need to write is also a collection原创 2013-03-11 20:12:43 · 1060 阅读 · 0 评论 -
POJ1308--并查集--Is It A Tree?
Description A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following pr原创 2013-02-02 19:51:19 · 525 阅读 · 0 评论 -
HDU4424--Conquer a New Region
Description The wheel of the history rolling forward, our king conquered a new region in a distant continent. There are N towns (numbered from 1 to N) in this region connected by several roads. I原创 2014-09-12 20:44:25 · 639 阅读 · 0 评论