UVA13212 How many inversions?

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=878&page=show_problem&problem=5135 [PDF](https://uva.onlinejudge.org/external/132/p13212.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13212/56936c46e6a86e265df3b452fbf0cfc32cffa840.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13212/54833228d07c0eedf2af8994651cd82a6a161c6c.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13212/7f1033358b67e558db9109bc7efba4eae490a345.png)