You want to send a message that contains 12 distinct signals and 45 spaces. You want that for any pair of signals in the message, there should be at least 3 spaces between them. How many different messages can you send?
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
You want to send a message that contains 12 distinct signals and 45 spaces. You want that for any pair of signals in the message, there should be at least 3 spaces between them. How many different messages can you send?
Название |
---|
Let the number of blank spaces before the first signal be x0, the number of blank spaces between the first and second signal be x1, etc.
Then your problem is equivalent to counting number of solutions to equation x0 + x1 + x2 + ... + xn = T, where T is total number of blank spaces and xi ≥ 3 for all 0 < i < n. You can use variable yi = xi - 3 and get the number of integer solutions to x0 + y1 + y2 + ... + yn - 1 + xn = T - (n - 1) * 3, which is solvable by balls and urns.
As the signals are distinct, multiply by n! in the end.
So is the answer binomial coefficient of (24, 12) * 12!?