文件名称:IntegerPartition
介绍说明--下载内容均来自于网络,请自行研究使用
算法设计。3个经典的“整数划分”问题。
--
Input
每组输入是两个整数n和k。(1 <= n <= 50, 1 <= k <= n)
Output
对于每组输入,请输出四行。
第一行: 将n划分成若干正整数之和的划分数。
第二行: 将n划分成最大数不超过k的划分数。
第三行: 将n划分成若干奇正整数之和的划分数。
第四行: 将n划分成若干不同整数之和的划分数。-Algorithm design. 3 classic integer division problem.- Input each input two integers n and k. (1 <= n <= 50, 1 <= k <= n) Output for each input, please output four lines. First line: n divided into a number of positive integers and the division of a few. The second line: The maximum number n divided into k division of no more than a few. Third line: n divided into a number of odd positive integers and the division of a few. Fourth line: n divided into a number of different integers and the division of a few.
--
Input
每组输入是两个整数n和k。(1 <= n <= 50, 1 <= k <= n)
Output
对于每组输入,请输出四行。
第一行: 将n划分成若干正整数之和的划分数。
第二行: 将n划分成最大数不超过k的划分数。
第三行: 将n划分成若干奇正整数之和的划分数。
第四行: 将n划分成若干不同整数之和的划分数。-Algorithm design. 3 classic integer division problem.- Input each input two integers n and k. (1 <= n <= 50, 1 <= k <= n) Output for each input, please output four lines. First line: n divided into a number of positive integers and the division of a few. The second line: The maximum number n divided into k division of no more than a few. Third line: n divided into a number of odd positive integers and the division of a few. Fourth line: n divided into a number of different integers and the division of a few.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
B1 -- 整数划分.files
B1 -- 整数划分.htm
[B1].IntegerPartition.cpp
B1 -- 整数划分.htm
[B1].IntegerPartition.cpp