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:这样有点慢,这题直接有公式,[n/2]*[(n-1)/2]In Reply To:这样有点慢,这题直接有公式,[n/2]*[(n-1)/2] Posted by:dynamic at 2003-11-01 21:35:48 o(n) 第一个逆序数显然是 n*(n-1)/2 然后就是没移动一个数, 求出逆序数的变化量 不过没有公式爽 :P Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator