0-N knapsack-run error

one test case is giving run error
code:https://ide.codingblocks.com/s/244438
ques:https://hack.codingblocks.com/app/contests/1289/146/problem

hello @bhaskar0_0
capacity can be upto 10^5 and ur dp array can handel upto 10^3.
so make required changes .
if still it shows error than use linear dp.