Inverse Pair
For a sequence t1...nt_{1...n}t1...n, we define the weight of it is the number of pairs (i,j)(i,j)(i,j) satisfy i<ji<ji<j and ti>tjt_i>t_jti>tj.
Now give you a permutation a1...na_{1...n}a1...n, you need to choose a sequence b1...nb_{
原创
2021-07-28 14:03:57 ·
81 阅读 ·
0 评论