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 |
这样有点慢,这题直接有公式,[n/2]*[(n-1)/2]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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator