Hello,need idea for this problem from SPOJ SEQ — Recursive Sequence . I am really new in matrix exponentiation learning.Here I learnt from this blog T matrix for the test case-
3
1 2 3
4 5 6
6
is T=
0 1 0
0 0 1
6 5 4
Then I multiply T with Identity matrix I.For me the answer should store in I[n-1][n-1].But maybe here I am missing something which I clearly missing completly.I searched in google and github but could not get a satisfactory answer.
my code