
并查集
Kirito_Acmer
这个作者很懒,什么都没留下…
展开
-
hdu1272 小希的迷宫
Problem Description 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。原创 2015-04-20 21:20:15 · 538 阅读 · 0 评论 -
hdu5627 Clarke and MST (并查集)
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 311 Accepted Submission(s): 173 Problem Description Clarke is a patient with mult原创 2016-02-16 14:46:20 · 709 阅读 · 0 评论 -
hdu3938 Portal
Problem Description ZLGG found a magic theory that the bigger banana the bigger banana peel .This important theory can help him make a portal in our universal. Unfortunately, making a pair of porta原创 2015-05-13 18:33:29 · 686 阅读 · 0 评论 -
hdu2818 Building Block
Problem Description John are playing with blocks. There are N blocks (1 M X Y : Put the whole pile containing block X up to the pile containing Y. If X and Y are in the same pile, just ignore t原创 2015-05-13 12:02:23 · 610 阅读 · 0 评论 -
hdu3038 How Many Answers Are Wrong
Problem Description TT and FF are ... friends. Uh... very very good friends -________-b FF is a bad boy, he is always wooing TT to play the following game with him. This is a very humdrum game.原创 2015-05-13 10:35:22 · 867 阅读 · 0 评论 -
hdu3047 Zjnu Stadium
Problem Description In 12th Zhejiang College Students Games 2007, there was a new stadium built in Zhejiang Normal University. It was a modern stadium which could hold thousands of people. The audi原创 2015-05-12 21:48:36 · 639 阅读 · 0 评论 -
hdu3461 Code Lock
Problem Description A lock you use has a code system to be opened instead of a key. The lock contains a sequence of wheels. Each wheel has the 26 letters of the English alphabet 'a' through 'z', in原创 2015-05-12 17:11:24 · 658 阅读 · 0 评论 -
hdu1558 Segment set
Problem Description A segment and all segments which are connected with it compose a segment set. The size of a segment set is the number of segments in it. The problem is to find the size of some se原创 2015-05-11 19:45:28 · 703 阅读 · 0 评论 -
hdu3635 Dragon Balls
Problem Description Five hundred years later, the number of dragon balls will increase unexpectedly, so it's too difficult for Monkey King(WuKong) to gather all of the dragon balls together.原创 2015-05-11 13:09:38 · 696 阅读 · 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 friend原创 2015-05-09 19:09:49 · 613 阅读 · 0 评论 -
Codeforces Round #345 (Div. 1) C. Table Compression (并查集)
Little Petya is now fond of data compression algorithms. He has already studied gz, bz, zip algorithms and many others. Inspired by the new knowledge, Petya is now developing the new compression alg原创 2016-03-16 18:25:50 · 943 阅读 · 0 评论