ilove Strings
시간 제한2초메모리 제한1024 MB
모음으로 시작해 모음과 자음이 번갈아 나오고 다섯 글자가 모두 다른 길이 5 부분수열의 개수를 10^9+7로 나눈 나머지를 구한다.
문제
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 and 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 — the loveliness of the string modulo .