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:为什么用树状数组做会超时啊?也是nlogn复杂度

Posted by huangkun at 2008-07-27 15:52:34 on Problem 3598
In Reply To:为什么用树状数组做会超时啊?也是nlogn复杂度 Posted by:sunnyboy1001 at 2008-05-16 19:45:29
> 先对v从小到大排序。
> 然后用树状数组记录w
> 从前往后,对一个点v,w,先求已经记录的小于w的个数和,作为权值。
> 然后,数组中w项的值加一。
> 最后,对权值进行排列。
> 
> 这样也超时,卡得也太严了吧?还是哪里复杂度退化了?
> 
> 求达人解释一下,谢谢了!!!

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