#P3904. 三只小猪
三只小猪
Description
For their safety, the little pigs built another new brick house. But now a problem arises: how should the three little pigs be assigned to the two houses? The third little pig is the smartest of the three. To avoid wasting any house, it considered a total of three plans, as shown below.

"But what about the future?" The third little pig knows that as their group grows, they will build more houses. It wants to know, given the numbers of houses and pigs, how many allocation plans there are. However, this problem is clearly a bit hard for it. Can you help the little pig solve it?
Input Format
The input contains a single line with two integers and , denoting the number of pigs and the number of houses ().
Output Format
Output a single integer: the number of ways to place pigs into houses such that no house is left empty.
4 2
7
6 7
0
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号