Subset Sum Easy problem


sir the code is showing wrong answer when submitted
please help

Hey @DJ20001 there were 2 errors in your code.

  1. You need to use cout<<endl after printing Yes or No for each β€˜t’.
    2)You need set your variable β€˜g’ equal to 0 for each β€˜t’, otherwise if g becomes greater than 0 for any test case
    it will remain true for remaining testcases as well and your code always prints β€˜Yes’.

If you have any further queries please feel free to ask.