MayankPratap's blog

By MayankPratap, history, 9 years ago, In English

Hello everyone, I was practicing dynamic programming and I came across this problem :- http://www.spoj.com/problems/SEQ/ . I read a blog on solving linear recurrences here :- http://fusharblog.com/solving-linear-recurrence-for-programming-contest/ and used same technique to solve the problem .

My output for sample cases is correct but I am getting WA on submit. My solution is http://pastebin.com/tYt0LCw2 . Can anybody help me ? I am new to dynamic programming.

  • Vote: I like it
  • -3
  • Vote: I do not like it

| Write comment?