Broken_Soul's blog

By Broken_Soul, history, 6 years ago, In English

Hello everyone, I am trying this DP problem on my own, I am using Memoization. Most of the test cases work fine, but I don't know why I am getting a wrong answer. Can anyone please point out my mistake? Also this is my first time posting here, so if I make any mistake, I apologise in advance.

Problem link — https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=977) my code — https://pastebin.com/LddwmQRc

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it