Problem Description

Count pairs i a[j].

Input Format

First n. Next line n integers.

Output Format

One integer inversions.

Sample Test Case

Input:
5 2 4 1 3 5
Output:
3

Constraints

n

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next