| Time Limit: 1000MS | Memory Limit: 30000K | |
| Total Submissions: 3299 | Accepted: 1405 |
Description
S = { 1, 3, 9, 27, 81, ... }
Consider the sequence of all subsets of S ordered by the value of the sum of their elements. The question is simple: find the set at the n-th position in the sequence and print it in increasing order of its elements.
Input
Output
Sample Input
1 7 14 783 1125900981634049 0
Sample Output
{ }
{ 3, 9 }
{ 1, 9, 27 }
{ 3, 9, 27, 6561, 19683 }
{ 59049, 3486784401, 205891132094649, 717897987691852588770249 }
Source
370



被折叠的 条评论
为什么被折叠?



