Loading web-font TeX/Math/Italic

Problem #314

Let's be Wholesome

S = {1, 3, 5, 7, \ldots, 6969}.

A subsequence of length 3, say {a,b,c}, is said to be bad if it satisfies the relation a < c < b.

Any rearrangement of S, say P, is said to be wholesome if there exists no bad subsequence of length 3 in it.

Calculate the number of wholesome rearrangements of S.

Report the answer modulo (10^9 + 7).

Note: A subsequence is a sequence that can be derived from the given sequence by deleting zero or more elements without changing the order of the remaining elements.

Contributed by Rudransh Aggarwal

Solved by 16 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.