
并查集
文章平均质量分 80
bocmingbetter
这个作者很懒,什么都没留下…
展开
-
HDU - 1213
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 friends know each other, a原创 2017-04-06 21:06:07 · 175 阅读 · 0 评论 -
POJ - 2513 并查集,欧拉回路,字典树
参考博客:http://blog.youkuaiyun.com/lyy289065406/article/details/6647445 题意:就是给你一些棍棒,每段都有颜色,然后把它们连成一条直线,要求首位相接的两个棍棒颜色要相同。 这是个人训练赛的一个题,当时感觉挺简单的,感觉就是一个无向图,但是对于渣渣的我来说根本不知道从哪开始做,后来看了看大佬们的博客才恍然大悟,运用到了不少我不怎么会的知识点,这原创 2017-04-18 16:04:35 · 278 阅读 · 0 评论 -
POJ - 2236 简单的并查集
并查集简单应用原创 2017-04-12 21:33:45 · 246 阅读 · 0 评论 -
POJ - 2031
题意:给你n个球,如果两个球是接触的那么连接就不花费,如果不是接触的那么就是接触的距离,很容易看出是个最小生成树的。 最近对ACM有点迷茫,不知道为什么,感觉看到每个题都感觉很难,也不愿意去思考,有点脑子疼。。很无奈,不知怎么取舍,毕竟我的专业不是专攻这个的。。哎,有点无奈。#include #include #include #include #include #include #原创 2017-04-26 21:47:11 · 232 阅读 · 0 评论