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:这样有点慢,这题直接有公式,[n/2]*[(n-1)/2]

Posted by xhope at 2003-11-01 22:26:35 on Problem 1455
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:
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