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 |
本题若用平衡树则有以下数据(我的实现):莫名的splay(单旋): TLE; CLRS上的weight-balanced-tree :938ms SBT :579ms; 不splay,乱旋:563ms; B+Tree([2,4]):297ms; Red-Black T: 282ms; B-Tree([1,3]):282ms;//2-3-4 Tree; AVL :235ms; B-Tree([4,9]):219ms; B-Tree([2,5]):204ms; B+Tree([4,8]):188ms; B+Tree([3,6]):172ms; B-Tree([3,7]):172ms; 注:本题数据太小,B-Tree上用二分搜索加速体现不出来优势,故用了线性查找; 但B+Tree用了二分查找; [3,7]表示一个结点可能有3,4,5,6,7个数据; //本题还是推荐hash Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator