牛客網Binary Vector
阿新 • • 發佈:2020-07-27
連結: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 independentvectors in the next nnn days modulo 109+710^9+7109+7.Formally, it can be proved that the answer has the form ofPQ\frac{P}{Q}QP, wherePPPandQQQ are coprime andQQQ is not a multiple of 109+710^9+7109+7. The answer modulo 109+710^9+7109+7 thus means P⋅Q−1(mod109+7)P \cdot Q^{-1} (\textrm{mod}\ 10^9+7 )P⋅Q−1(mod109+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