Removing duplicates in "Sum It Up"

my code https://ide.codingblocks.com/s/33926
ques link https://hack.codingblocks.com/contests/c/523/912
In the sample test case {1,7} and {1,2,5} are repeating in my program’s output . how to remove these duplicates

Add the answer in a set to ensure you get a unique combination. This should work.

how to add an array to a hashmap