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:这题我用的qsort+树状数组,为什么还是TLE啊?In Reply To:Re:这题我用的qsort+树状数组,为什么还是TLE啊? Posted by:Mrw at 2010-09-25 11:02:22 > 快排要随机化数据的。。。 > > 给你个倒序的数据你快排不就N2了。。。 这点肯定会考虑了, 快排中每次随机取一个数,再对比它小的和比他大的分别排序,这个数的位置是随机的, 我就是 快排加树状数组过的。。。。900+ms Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator