Submit | All submissions | Best solutions | Back to list |
EIUSUBSET - Subset 1 |
Given a set A with N elements, generate all non-empty subsets of A.
Input
The first line is N (1<=N<=20)
The next line contains N distinct double a elements of the set. (1<=a<=100)
Output
The first line is M, the number of non-empty subsets
The next m lines are the subsets.
Example
Input:
33 1 2 3
Output:
37 3 2 2 3 1 1 3 1 2 1 2 3