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

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

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
  • Проголосовать: не нравится

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

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

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

Add condition when ind becomes greater than n