Problem
A partial permutation is an ordering of only objects taken from a collection containing objects (i.e., ). For example, one partial permutation of three of the first eight positive integers is given by .
The statistic counts the total number of partial permutations of objects that can be formed from a collection of objects. Note that is just the number of permutations of objects, which we found to be equal to in “Enumerating Gene Orders”.
Given: Positive integers and such that and .
Return: The total number of partial permutations , modulo 1,000,000.
甲局部排列是唯一的排序对象从含集合取对象(即,)。例如,前八个正整数中的三个正整数的一个部分置换由给出。
统计数据统计可以从对象集合中形成的对象的部分排列总数。请注意,是排列的只是数量的对象,我们发现等于在“枚举的基因顺序”。
给定:正整数,并这样和。
返回值:部分排列的总数,取模1,000,000。
Sample Dataset
21 7
Sample Output
51200