Problem Description

Count number of inversions in the array (iarr[j]). Print the count.

Input Format

One line: n then n integers.

Output Format

One integer count.

Sample Test Case

Input:
5 2 4 1 3 5
Output:
3

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next