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:kruskal 为什么WA???

Posted by smwwh at 2010-09-23 16:43:55 on Problem 2421
In Reply To:kruskal 为什么WA??? Posted by:smwwh at 2010-09-23 12:04:52
大牛出来指点指点啊,
已经N次出现kruskal()WA, prim()AC的现象了....
我的kruskal()到底是那错啦?
kruskal()+并查实只是为了效率,
for(i=1; i<=N; i++)
	if(vset[i] == vset[V2])
		vset[i] = vset[V1];
这样更新应该也没错啊??

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