[35.] to prove safety Offer array in reverse order to achieve python

Title Description

Two numbers in the array, if a number is greater than the front behind the figures, the two numbers form a reverse pair. Enter an array, this array P. finds the total number of reverse pair P and outputs the result modulo 1000000007. I.e., the output P% 1000000007

Enter a description:

Title ensure the same number of the input array is not

data range:

对于%50的数据,size<=10^4

对于%75的数据,size<=10^5

对于%100的数据,size<=2*10^5

Example 1
Input
1,2,3,4,5,6,7,0
output
7

在这里插入代码片
Published 99 original articles · won praise 6 · views 3960

Guess you like

Origin blog.csdn.net/weixin_42247922/article/details/104020982