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 |
终于AC了,看来不压缩路径还是不行的刚接触到并查集,以为自己理解了. 程序写出来之后,感觉很简单,也没有用到压缩路径,但提交时总是超时. 仔细一想,如果不压缩路径,就变成了对单链表的操作,非常耗时,对路径进行压缩之后,就AC了 看来不压缩路径还是不行的. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator