![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
快速幂
非常可乐(이녕)
贵在自知,贵在坚持
展开
-
NYOJ 148 fibonacci数列(二)【矩阵快速幂】
fibonacci数列(二)时间限制:1000 ms | 内存限制:65535 KB难度:3描述In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the F原创 2016-04-12 21:08:23 · 699 阅读 · 0 评论 -
NYOJ 301 递推求值【矩阵快速幂】
递推求值时间限制:1000 ms | 内存限制:65535 KB难度:4描述给你一个递推公式:f(x)=a*f(x-2)+b*f(x-1)+c并给你f(1),f(2)的值,请求出f(n)的值,由于f(n)的值可能过大,求出f(n)对1000007取模后的值。注意:-1对3取模后等于2输入第一行是一个整数T,表示测试数据原创 2016-04-12 22:06:50 · 378 阅读 · 0 评论 -
ZOJ 2853 Evolution【矩阵快速幂】
EvolutionTime Limit: 5 Seconds Memory Limit: 32768 KB Evolution is a long, long process with extreme complexity and involves many species. Dr. C. P. Lottery is currently investigating原创 2016-04-12 22:20:03 · 306 阅读 · 0 评论