#D. 自然数的拆分问题
自然数的拆分问题
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Description

Input Format

Output Format

7
1+1+1+1+1+1+1
1+1+1+1+1+2
1+1+1+1+3
1+1+1+2+2
1+1+1+4
1+1+2+3
1+1+5
1+2+2+2
1+2+4
1+3+3
1+6
2+2+3
2+5
3+4
Hint

Source
#include using namespace std; int n,a[25]; void dfs(int sum,int step){ if(){ //输出 return; } for(){//枚举 if(){ ;//填数 dfs(); }}
} int main(){ cin>>n; dfs(0,1); return 0; }