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:设想...

Posted by Assassin_ws at 2009-03-21 20:47:34 on Problem 2299 and last updated at 2009-03-21 20:51:51
In Reply To:设想... Posted by:Assassin_ws at 2009-03-21 19:03:05
> 离散化+树状数组可以么?
> 先把读入,然后离散化,
> 在就是用树状数组依次求逆序数了.
> 总时间复杂度貌似是O(nlogn+nlogn+nlogn)
> 第一个nlogn是快排离散.
> 第二个nlogn是树状数组求和
> 第三个nlogn是修改树状数组的值
> 一般情况下,树状数组的求和与修改与log相去甚远...

设想已经得到验证...
4297ms.....
准确的说,时间复杂度为O(4nlogn).
树状数组加离散...虽然效果不太明显,但毕竟是今天才学的离散,且此算法具有创意性...
所以...
掌声鼓励一下...

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