arun_prasad's blog

By arun_prasad, history, 8 years ago, In English

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

problem

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

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?