how to use matrix exponentiation in this problem ? ( help required in speeding up solution )

Правка en1, от arun_prasad, 2017-02-01 06:12:23

ive been trying to solve this problem since yesterday night . however i could only come up with an O(d*d*k) solution.

this however wont work due to Memory and time limits.

I also looked at one of the solved solutions by rajat1603 solution link

Could someone explain how matrix exponentiation could be used in these type of problems ?

help would be greatly appreciated :D

Теги matrix exponentiation, dp, help needed

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский arun_prasad 2017-02-01 06:12:56 57
en1 Английский arun_prasad 2017-02-01 06:12:23 547 Initial revision (published)