Problem1731--DFS-数字分解

1731: DFS-数字分解

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 143  Solved: 99
[Status] [Submit] [Creator:]

Description

任何一个大于1的自然数n(n<=30),总可以拆分成若干个小于n的自然数之和。输出n的分解方案(n=n也是一种分解方案)

Input

正整数n(n<=30)

Output

分解的方案

Sample Input Copy

5

Sample Output Copy

1 1 1 1 1
1 1 1 2
1 1 3
1 2 2
1 4
2 3
5

Source/Category

 提高A