#2607. 求逆序对
求逆序对
Description
给定一个序列$a\_1,a\_2,…,a\_n$,如果存在$ia\_j$,那么我们称之为逆序对,求逆序对的数目。
## Input Format
第一行为$n$,表示序列长度,接下来的$n$行,第$i+1$行表示序列中的第$i$个数。
## Output Format
所有逆序对总数。
```input1 4 3 2 3 2
```output1
3
Hint
。
给定一个序列$a\_1,a\_2,…,a\_n$,如果存在$ia\_j$,那么我们称之为逆序对,求逆序对的数目。
## Input Format
第一行为$n$,表示序列长度,接下来的$n$行,第$i+1$行表示序列中的第$i$个数。
## Output Format
所有逆序对总数。
```input1 4 3 2 3 2
```output1
3
N≤105,A_i≤105。