Words with Gaps
Let be the number of words that can be formed using the letter A times, the letter B times and the letter C times with the condition that every A is separated from every B by at least two Cs. For example, CACACCBB is a valid word for but ACBCACBC is not.
You are given and .
Find . Give your answer modulo .
带间隔的单词
记为由个A、个B和个C构成、且任意A和B之间间隔至少两个C的单词数目。例如,对于,CACACCBB是一个合法单词,而ACBCACBC不是。
已知,。
求, 并对取余作为你的答案。
Gitalking ...