Problem 705
Total Inversion Count of Divided Sequences
The inversion count of a sequence of digits is the smallest number of adjacent pairs that must be swapped to sort the sequence.
For example,
If each digit of a sequence is replaced by one of its divisors a divided sequence is obtained.
For example, the sequence
Define
For example,
Define
You are given
Find
整除列的逆序对数
一个数字序列的逆序对数是指通过交换相邻数字对序列进行排序时所需的步数。
例如,序列
将数字序列中的每个数字替换为其约数,得到的新序列称为其整除列。
例如,序列
记
记
已知
求
Gitalking ...