(重发了一遍)有如下递推式,给定 www: Fi={1 (i≤2)Fi−1+Fi−2+iw (otherwise.)F_i=\left\{\begin{aligned}1\space&(i\le2)\\F_{i-1}+F_{i-2}+i^w\space&(\text{otherwise.})\end{aligned}\right.Fi={1 Fi−1+Fi−2+iw (i≤2)(otherwise.) 求 Fn mod (109+7)F_n\bmod(10^9+7)Fnmod(109+7),如何用矩阵快速幂做到 O(w3logn)O(w^3\log n)O(w3logn) 的复杂度。