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

Re:这题我用的qsort+树状数组,为什么还是TLE啊?

Posted by hehexiaobai at 2011-03-18 19:21:37 on Problem 2481
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:
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