Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13172 Accepted: 9368 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 seque…
Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7752 Accepted: 5501 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…
传送门 矩阵快速幂板题,写一道来练练手. 这一次在poj做题总算没忘了改万能库. 代码: #include<iostream> #include<cstdio> #define mod 10000 #define A a[0][0] #define B a[0][1] #define C a[1][0] #define D a[1][1] using namespace std; int n; struct Matrix{int a[2][2];Matrix(){A=0,B=C=D…