Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cses-1716.mdx #4911

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions solutions/gold/cses-1716.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ to count how many ways you can put the children between the apples.
## Explanation

To get a more illustrative idea of the given problem, consider $n + m - 1$ white
balls in a row. Of those $n + m - 1$ white balls, $m - 1$ are chosen to be
colored black as separators, which gives us exactly $m$ segments of (possibly
balls in a row. Of those $n + m - 1$ white balls, $n - 1$ are chosen to be
colored black as separators, which gives us exactly $n$ segments of (possibly
zero) white balls. There are

$$
\binom{n + m - 1}{m - 1}
\binom{n + m - 1}{n - 1}
$$

ways to choose the balls to color black.

The ways to color $m - 1$ balls black corresponds to the ways to distribute
those $n$ apples to $m$ children, since the number of white balls in a segment
The ways to color $n - 1$ balls black corresponds to the ways to distribute
those $m$ apples to $n$ children, since the number of white balls in a segment
corresponds to the number of apples given to a child.

<Info title="Stars and bars">
Expand Down
Loading