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:怎样用并查集?In Reply To:怎样用并查集? Posted by:huangkun at 2008-07-14 21:21:36 每个hash值作为一个集合,记录每个集合可容纳元素数目,初始为1 将每个词的两个hash值合并,并将容量减1。如果某一时刻有集合容量为负则无解。 因为合并的集合类似一个环,所以同一集合总能“挪”出一个空位置放新的元素,没仔细证明过。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator