Блог пользователя mufasa

Автор mufasa, 13 лет назад, По-английски

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

Теги dp
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
13 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
13 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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