链接:https://ac.nowcoder.com/acm/contest/5671/B
来源:牛客网
题目描述:
Roundgod is obsessive about linear algebra. Let A={0,1}A=\{0,1\}A={0,1}, everyday she will generate a binary vector randomly in AnA^nAn. Now she wonders the probability of generating nnn linearly independent vectors in the next nnn days modulo 109+710^9+7109+7. Formally, it can be proved that the answer has the form of PQ\frac{P}{Q}QP, where PPP and QQQ are coprime and QQQ is not a multiple of 109+710^9+7109+7. The answer modulo 109+710^9+7109+7 thus means P⋅Q−1(mod 109+7)P \cdot Q^{-1} (\textrm{mod}\ 10^9+7 )P⋅Q−1(mod 109+7), where Q−1Q^{-1}Q−1 is the multiplicative inverse of 109+710^9+7109+7.
Wcy thinks the problem too easy. Let the answer of nnn be fnf_nf