아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

ilove Strings

시간 제한2초메모리 제한1024 MB

요약
모음으로 시작해 모음과 자음이 번갈아 나오고 다섯 글자가 모두 다른 길이 5 부분수열의 개수를 10^9+7로 나눈 나머지를 구한다.
난이도

보통10점 중 6점

유형
동적 계획법, 문자열, 조합론
정답자
아직 제출이 없습니다

문제

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 11 and 100,000100\\,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 LL — the loveliness of the string modulo 109+710^9 + 7.

예제3

  1. 예제 1

    입력
    ilovestrings
    
    예상 출력
    4
    
  2. 예제 2

    입력
    idont
    
    예상 출력
    0
    
  3. 예제 3

    입력
    CAPital
    
    예상 출력
    1