- 博客(2)
- 收藏
- 关注
原创 POJ - Matrix Power Series 【矩阵快速幂+二分求和】
Description Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak. Input The input contains exactly one test case. The first line of input contains three
2014-03-01 21:51:24 547
原创 POJ - Fibonacci 【快速幂 + 矩阵】
Description 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 Fibonacci sequence are: 0, 1, 1, 2, 3, 5, 8, 13, 21,
2014-02-27 20:36:26 653
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人