Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:用并查集写的,但WA了,可很多数据都过了

Posted by y08zxx at 2009-01-22 23:03:03 on Problem 1308
In Reply To:Re:用并查集写的,但WA了,可很多数据都过了 Posted by:ccnujing at 2008-06-10 09:34:29
> 好像最后一次要判断树的节点数和边数的关系
不用的
1.只要是没有回路,即其父节点相同的话NOT
2.没有构成森林,(若是树的话其所有元素的根节点都是一样的)森林就会出现根结点不同的情况,则NOT

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator