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

这样有点慢,这题直接有公式,[n/2]*[(n-1)/2]

Posted by dynamic at 2003-11-01 21:35:48 on Problem 1455
In Reply To:Re:就是求逆序数 ~ Posted by:xhope at 2003-11-01 21:32:21
> 
> 1 2 3 4 ==> 4 3 2 1
> 2 3 4 1 ==> 4 3 2 1
> 3 4 1 2 ==> 4 3 2 1
> 4 1 2 3 ==> 4 3 2 1
> 
> 求出所有从 第一列 换 到第二列的交换次数,
> 取最小值就可以了

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