
------矩阵快速幂
fisty
hi
展开
-
等比数列二分求和
今天我们学习如何有效地求表达式的值。对于这个问题,用二分解决比较好。 (1)当时,(2)当时,那么有 (3)当时,那么有原创 2014-08-23 13:19:09 · 621 阅读 · 0 评论 -
poj 3233 Matrix Power Series
#include #include #include using namespace std;const int N = 35;struct Matrix{ int m[N][N];};Matrix I;int n,k,M;Matrix add(Matrix a, Matrix b){ Matrix c; for(int i =原创 2014-10-02 17:34:06 · 451 阅读 · 0 评论 -
HDU 4686(矩阵快速幂)
An Arc of Dream is a curve defined by following function:where a 0 = A0 a i = a i-1*AX+AY b 0 = B0 b i = b i-1*BX+BY What is the value of AoD(N) modulo 1,000,000,007? Input原创 2015-08-27 13:40:37 · 1216 阅读 · 0 评论