cswork / OA打开练习工作台

SnowflakeOA #8

String Patterns — Bounded Consecutive Vowels

估计中等可在线判题

考点(AI 标注)动规入门

Count lowercase English strings of length n with at most k consecutive vowels. There are 5 vowels, aeiou, and 21 consonants. Output the count modulo 10⁹+7.

输入格式

One line: n k, with 1≤n≤2500 and 0≤k≤n.

输出格式

Output the single integer required by the problem.

样例 1

输入:

1 1

输出:

26

样例 2

输入:

4 1

输出:

412776

样例 3

输入:

4 2

输出:

451101

样例说明

The answers to the three public examples are, in order: 26; 412776; 451101. All examples have been verified by independent small-scale enumeration or state search.