
训练计划
PJQOOO
这个作者很懒,什么都没留下…
展开
-
(并查集)POJ 1308 & HDU 1325
一开始以为两道题是一样的,POJ的过了直接用相同代码把HDU的交了,结果就悲剧了。最后发现HDU的没有考虑入度不能大于一。题意:用树的定义来 判断吧,无环,n个结点最多有n-1条边,不然就会有环。只有一个入度为0的结点,不存在入度大于1的结点。思路:并查集.AC代码:原创 2014-07-16 16:23:04 · 416 阅读 · 0 评论 -
POJ 2524 Ubiquitous Religions(并查集)
DescriptionThere are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding out how many different religions students in your原创 2014-07-07 13:11:03 · 506 阅读 · 0 评论