mufasa's blog

By mufasa, 11 years ago, In English

Hi i want to solve this problem using Dynamic programming. Please provide some hint Problem: http://topcoder.bgcoder.com/print.php?id=596

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

| Write comment?
»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

i am not able to formulate the optimal substructure. i just need hint on that

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

The constraints are too low, you brute force it recursively, along with a memorization. In the editorial, the writer mention an 'matrix multiplication' like solution, but I don't even mind how to start coding such a solution