In an arrangement, if the front and back positions of a pair of numbers are opposite to the size order, that is, the front number is greater than the back number, it is called reverse order. The total number of inverses in an arrangement is called the number of inverses in this arrangement. Even arrangement is called even arrangement. An odd permutation is called an odd permutation. For example, at 243 1, 2 1, 43, 4 1, 3 1 is in reverse order, and the reverse order number is 4, which is even.
134782695
1 - 0
3 - 1
4 - 1
7 - 3
8 - 3
2 - 0
6 - 1
9 - 1
5 - 0
The total number is 10, which means the inverse number is 10.
1274i56j9
The answer should be (i, j)=(8, 3).
Because the values cannot be taken repeatedly, ij above can only take one of 3 and 8, but i=3 and j=8 do not match.
You can do the math yourself.