#P2606. [ZJOI2010] 排列计数
[ZJOI2010] 排列计数
Description
We call a permutation of "Magic" if and only if
$$\forall i \in [2,n], \; p_i > p_{\lfloor i/2 \rfloor}.$$Count how many permutations of are "Magic". The answer may be large; output the value modulo .
Input Format
One line contains two integers , as described above.
Output Format
Output a single integer: the number of "Magic" permutations of modulo .
20 23
16
Hint
Constraints
For of the data, , , and is a prime.
Translated by ChatGPT 5
京公网安备 11011102002149号