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
Added by: | Ha Minh Ngoc |
Date: | 2016-04-27 |
Time limit: | 1s-2.5s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET |