시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 1024 MB | 9 | 6 | 6 | 75.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:
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$.
ilovestrings
4
idont
0
CAPital
1
ICPC > Regionals > North America > North America Qualification Contest > ICPC North America Qualifier 2021 F번