#c22203. 字典序枚举
字典序枚举
Lexicographic Enumeration of Bit Strings
Problem Description
Given an integer , you need to output, in a certain order, all -bit strings made of characters 0 and 1.
The -th line contains all strings with exactly ones. The strings on each line are sorted in lexicographic order and separated by a single space. See the sample for details.
Input Format
One line with an integer .
Output Format
Output lines, each containing several strings separated by spaces.
Sample Input
3
Sample Output
000
001 010 100
011 101 110
111
Constraints
For all data: .