#P1571. 自然数的拆分问题

自然数的拆分问题

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; }