| ||||||||||
Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:经典并查集! 附代码!只不过时间多了些,但不知为什么能acIn Reply To:经典并查集! 附代码!只不过时间多了些,但不知为什么能ac Posted by:wangbaobao at 2009-05-17 21:16:54 这2句应该有问题(没试验过): union_set(find_set(opp[x]),y); union_set(x,find_set(opp[y])); x = find_set(x), y = find_set(y); <--多加这一句 opp[x]=y; opp[y]=x; 这样肯定过。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator