929. Odd-Run Compositions

A composition of n is a sequence of positive integers which sum to n. Such a sequence can be split into runs, where a run is a maximal contiguous subsequence of equal terms.

For example, 2,2,1,1,1,3,2,2 is a composition of 14 consisting of four runs:

2,21,1,132,2

Let F(n) be the number of compositions of n where every run has odd length.

For example, F(5)=10:

54,13,22,32,1,22,1,1,11,41,3,11,1,1,21,1,1,1,1

Find F(105). Give your answer modulo 1111124111.

929. 奇长度相同段组成

若某正整数序列的所有元素之和是 n,则称这是 n 的一个 组成。这个序列可以被拆分成若干含相同元素的极大连续段。

例如,[2,2,1,1,1,3,2,2]14 的一个组成,它包含 4 个含相同元素的极大连续段。

2,21,1,132,2

F(n) 为满足如下条件的序列数量:其是 n 的一个组成,且这个序列中,所有含相同元素的极大连续段的长度都是奇数。

例如,F(5)=10,这 10 个满足条件的序列如下:

54,13,22,32,1,22,1,1,11,41,3,11,1,1,21,1,1,1,1

F(105)1111124111 的值。


这个链接 回到源站。

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