Help me in approach cant think of a solution SPOJ.com - Problem ABA12C
Hey @dopedope
This is an Dynamic Programming problem.
In this problem you have to from all possible sum of weight which are available with the minimum possible cost and check if the sum is equal to k.
you can try practicing the similar problem https://cses.fi/problemset/task/1158