COCI '09 Contest 1 #3 Dobra

View as PDF

Submit solution

Points: 7
Time limit: 0.6s
Memory limit: 32M

Problem types
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Lea runs into a lot of words in her life. A lot of them she finds unpleasant. To compensate for that she started making up pleasant words. Lea makes up new words by writing a nice looking string of characters on a piece of paper. She than erases a few of the most nasty looking characters and replaces them with underscores _. After that she tries to replace the underscores with more acceptable characters trying to form a pleasant word. Lea considers words pleasant if they do not contain 3 sequential vowels, 3 sequential consonants and contain at least one letter L. In Croatian vowels are letters A, E, I, O, U only. All other letters are consonants.

Input Specification

The first and only line of input contains a string of characters, at most 100. The string contains only of uppercase English letters and characters _. There will be at most 10 characters _.

Output Specification

The first and only line of output should contain a single integer - the total number of pleasant words that can be formed by substituting underscores with uppercase letters of the English alphabet.

Warning: Use 64-bit number formats. long long in C/C++, int64 in Pascal.

Sample Input 1


Sample Output 1


Sample Input 2


Sample Output 2


Sample Input 3


Sample Output 3



There are no comments at the moment.