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

Автор Legend_11, история, 5 месяцев назад, По-английски

Hello Codeforces, I was trying to solve the question : Question. I tried to solve it in a knapsack dp kind of manner. It does not show on what testcase I am going wrong , infact it does not show any testcases apart from the sample test cases. so it's my kind request if anybody can help me regarding this question

Code

I am getting WA on testcase 2. I am unable to think of any counter test case or what I am doing wrong. It would be really helpful if somebody could help me regarding this question . Thank you in advance.

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