Subset Sum Easy

My code works for the given inputs but showing wrong ans after submiiting.
Please tell what am I doing wrong?

@dhruvgupta1498
Hello dhruv,
Your logic was totally correct.you just missed to initialise flag=0 for each test case .I have added at line no - 38.
here is your working code link - https://ide.codingblocks.com/s/174166
regards
Aman yadav

@dhruvgupta1498 please mark your doubt as resolved