P8955 [HackerEarth] inversions easy
普及
题目描述

Given an array A of N integers. Find total number of pairs such that i < j and A[i] > A[j].

Constraints

1 ≤ N ≤ 2*10^3

1 ≤ Ai ≤ 10^9

SAMPLE INPUT
5
5 1 2 4 3

SAMPLE OUTPUT
5

输入格式

见题面

输出格式

见题面

样例输入
5 5 1 2 4 3 SAMPLE
样例输出
5