并查集
文章平均质量分 93
Cherish_lii
这个作者很懒,什么都没留下…
展开
-
Knight Tournament_CodeForces 357C
题目 Hooray! Berl II, the king of Berland is making a knight tournament. The king has already sent the message to all knights in the kingdom and they in turn agreed to participate in this grand event...原创 2018-12-14 10:01:42 · 211 阅读 · 0 评论 -
Chemical table_CodeForces1013D
题目 Innopolis University scientists continue to investigate the periodic table. There are n·m known elements and they form a periodic table: a rectangle with n rows and m columns. Each element ca...原创 2018-12-16 21:52:12 · 351 阅读 · 3 评论 -
并查集入门
转自https://blog.csdn.net/u013546077/article/details/64509038 来看一个实例,杭电1232畅通工程 首先在地图上给你若干个城镇,这些城镇都可以看作点,然后告诉你哪些对城镇之间是有道路直接相连的。最后要解决的是整幅图的连通性问题。比如随意给你两个点,让你判断它们是否连通,或者问你整幅图一共有几个连通分支,也就是被分成了几个互相独立的块。像畅...转载 2018-12-11 15:39:22 · 149 阅读 · 0 评论