Блог пользователя Achha...ji

Автор Achha...ji, история, 3 года назад, По-английски

I am stuck around it and unable to figure out the problem ....If anyone who faced this issue or knows the solution for it ..reply in the comments,it will be really helpful. The problem is from Codeforces Educational round 95 div2 .....Here's the Problem and this is my solution implemented using Dynamic programming.

  • Проголосовать: нравится
  • -22
  • Проголосовать: не нравится

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

At the end of each test case, clear out the global dp array. This might solve your issue. :)

»
3 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Add condition when ind becomes greater than n