Segmentation fault in Subset sum

https://ide.codingblocks.com/s/590051

Please help. I’m getting seg fault