시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB96675.000%

문제

It’s that time of year when love is in the air. You’re no stranger to love. You are obsessed with strings but not just any strings. You love “ilove” Strings. An “ilove” String is a string of length 5 with the following properties:

  • Alternates between vowels (excluding ‘y’ and ‘Y’) and consonants (including ‘y’ and ‘Y’)
  • Begins with a vowel (excluding ‘y’ and ‘Y’)
  • Consists of 5 pairwise distinct characters (distinguishing between upper and lower case)

Examples of “ilove” Strings includes “ilove”, “image”, “IxoXO”, and “abide”. Examples of non-“ilove” Strings include , “ideas”, “maker”, “inane”, “oxOXo” and “abides”.

The loveliness of a string is the number of subsequences of the string that form an “ilove” String. Although “ilooove” is not an “ilove” String, it does have a loveliness of 3.

입력

Input contains a single string of between $1$ and $100\,000$ lowercase and uppercase Latin characters, representing the string whose loveliness is to be computed.

출력

For the provided string, print one line with a single integer $L$ — the loveliness of the string modulo $10^9 + 7$.

예제 입력 1

ilovestrings

예제 출력 1

4

예제 입력 2

idont

예제 출력 2

0

예제 입력 3

CAPital

예제 출력 3

1

출처

ICPC > Regionals > North America > North America Qualification Contest > ICPC North America Qualifier 2021 F번

  • 문제를 만든 사람: Travis Meade