- The first row represents the values of the different items as space seperated integers.
- The second row represents the weights of the different items as space seperated integers.
- The third row represents the capacity of the knapsack as a single integer.
- The fourth row represents the target value