873. Words with Gaps

Let W(p,q,r) be the number of words that can be formed using the letter A p times, the letter B q times and the letter C r 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 W(2,2,4) but ACBCACBC is not.

You are given W(2,2,4)=32 and W(4,4,44)=13908607644.

Find W(106,107,108). Give your answer modulo 1000000007.

873. 带间隔的单词

W(p,q,r) 为:由 p 个 A、q 个 B、r 个 C 组成,且任意 A、B 之间至少被 2 个 C 隔开的词的数量。例如,CACACCBB 是一个符合要求的词,而 ACBCACBC 不是。

已知:W(2,2,4)=32W(4,4,44)=13908607644

W(106,107,108)1000000007 的值。


这个链接 回到源站。

这个链接 回到详细版题目目录。