#T253. 数的划分
数的划分
Description
Divide the integer n into k parts, where each part cannot be empty, and no two parts can be the same (order does not matter). For example, when n = 7 and k = 3, the following three partitions are considered identical:
1, 1, 5; 1, 5, 1; 5, 1, 1.
The task is to determine the number of distinct partitions. Output an integer representing the number of distinct partitions.
Input Format
Two integers n and k (6 < n ≤ 200, 2 ≤ k ≤ 6), separated by a single space.
Output Format
An integer representing the number of distinct partitions.
7 3
4
Hint
The four possible ways to divide are: 1, 1, 5; 1, 2, 4; 1, 3, 3; 2, 2, 3.