#K69947. Unique Subsets Finder
Unique Subsets Finder
Unique Subsets Finder
Given a list of integers, possibly with duplicates, your task is to find all unique subsets. Each subset must be sorted in increasing order, and the collection of subsets must be returned in lexicographical order.
(\textbf{Note:}) The empty subset is always included, and no duplicate subsets should appear in the output.
inputFormat
The input is given via stdin as a single line containing space-separated integers. If the input is empty, it should be treated as an empty list.
outputFormat
Print the list of unique subsets as a Python-style list of lists. Each inner list (subset) should be enclosed in square brackets with its elements separated by a comma and a space. The entire result should be printed to stdout.## sample
1 2 3
[[], [1], [1, 2], [1, 2, 3], [1, 3], [2], [2, 3], [3]]