SUBSET SUM TO TARGET CPP

https://ide.codingblocks.com/s/234047,
I am getting a MLE in one testcase
Plz tell me where am i wrong and kindly update the same in my code

@Kush_1312
You have to do this using 1D dp array. because you cannot create 5000*(10^7) array.
instead you make only 10^7 array.
i have corrected your code.