Given an array of integers that may contain duplicates, return all possible subsets — without any duplicate subsets in the output.
Input: one line of space-separated integers. Output: one subset per line, elements in ascending order (the empty subset prints as an empty line). Subsets may be produced in any order — the template prints them canonically.
1 2 2
1 1 2 1 2 2 2 2 2
0
0
Run your code against the sample tests, or Submit to run the full suite.