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 |
设想...离散化+树状数组可以么? 先把读入,然后离散化, 在就是用树状数组依次求逆序数了. 总时间复杂度貌似是O(nlogn+nlogn+nlogn) 第一个nlogn是快排离散. 第二个nlogn是树状数组求和 第三个nlogn是修改树状数组的值 一般情况下,树状数组的求和与修改与log相去甚远... Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator