
并查集及其权值
文章平均质量分 86
cloudy_happy
像我这样优秀的人,不该平凡过一生
展开
-
hduoj1272小希的迷宫 并查集判断无向图成环
小希的迷宫 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给...原创 2018-08-04 22:37:28 · 373 阅读 · 0 评论 -
HDU3635 Dragon Balls 并查集
Dragon Balls 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. His cou...原创 2018-08-15 15:30:58 · 174 阅读 · 0 评论 -
poj1611 The Suspects 并查集
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 strategy is to s...原创 2018-08-15 23:24:45 · 119 阅读 · 0 评论 -
hdu3047 Zjnu Stadium 并查集
Zjnu StadiumIn 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 audience Seat...原创 2018-08-15 23:28:14 · 160 阅读 · 0 评论 -
poj1988Cube Stacking 并查集
Cube StackingFarmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N stacks, each containing a single cube. Farmer John asks Be...原创 2018-08-15 23:30:00 · 164 阅读 · 0 评论