SEQ — Recursive Sequence need idea.

Revision en1, by Night_Lord, 2020-09-27 18:03:20

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
Tags #spoj, #matrix exponentialtion, #help me

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Night_Lord 2020-09-27 18:03:20 2032 Initial revision (published)