给定一个长度为 n 的序列 a1, a2, …, an,求该序列中的逆序对数量。
第一行一个整数 n(1 ≤ n ≤ 10^5)。 第二行 n 个整数 ai(1 ≤ ai ≤ 10^9)。
输出一个整数,表示逆序对总数。
5 3 1 4 5 2
4