G. KKT基本算法1004数的拆分

    Type: Default 1000ms 256MiB

KKT基本算法1004数的拆分

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

输入一个整数n,输出n拆分成若干正整数和的所有方案,及n=s1+s1+...sk的形式,且s1<=s2<=...<=sk,n<=20,请按照字典序输出。

Input Format

一行一个正整数n

Output Format

所有的拆分方案和总方案数。

4
1+1+1+1
1+1+2
1+3
2+2
4
total=5