Problem M
Mega Inversions
The
Input
The first line of the input is the length of the sequence,
Output
Output the number of inverted triples.
Sample Input 1 | Sample Output 1 |
---|---|
3 1 2 3 |
0 |
Sample Input 2 | Sample Output 2 |
---|---|
4 3 3 2 1 |
2 |