Problem1071--permutation (recursion)

1071: permutation (recursion)

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

Given an integer N, please output all possible permutations of its Binary Representation.
Print the output in the lexicographically sorted form.

Input

One integer N   ( N can be large, but the number 1's and 0's together less than 25 )

Output

All possible permutations of its Binary Representation One line one of them

Sample Input Copy

5

Sample Output Copy

011
101
110

Source/Category