sgu 180 - Inversions (离散化+树状数组)
Inversions **Time Limit:**250MS **Memory Limit:**4096KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
180. Inversions # time limit per test: 0.25 sec. memory limit per test: 4096 KB
input: standard output: standard
There are N integers (1<=N<=65537) A1, A2,.. AN (0<=Ai<=10^9). You need to find amount of such pairs (i, j) that 1<=iA[j].
Input
The first line of the input contains the number N. The second line contains N numbers A1…AN.