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

终于AC了,看来不压缩路径还是不行的

Posted by wanghaishanren at 2008-05-02 10:38:21 on Problem 1988
刚接触到并查集,以为自己理解了.
程序写出来之后,感觉很简单,也没有用到压缩路径,但提交时总是超时.
仔细一想,如果不压缩路径,就变成了对单链表的操作,非常耗时,对路径进行压缩之后,就AC了
看来不压缩路径还是不行的.

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