COCI 2009/2010, Contest #1
Task DOBRA
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 plesant 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 underscores '_'. After that she tries to replace the underscores with more acceptable characters trying to form a plesant word.
Lea considers words plesant 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 lettters are consonants.
Input
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
The first and only line of output should cotain a single integer - the total number of plesant words that can be formed by substituing underscores with uppercase letters of the english alphabet.
Warning: Use 64 bit number formats. long long in C/C++, int64 in Pascal.
Sample Tests
InputL_V Output5 |
InputV__K Output10 |
InputJA_BU_K_A Output485 |
All Submissions
Best Solutions
Point Value: 7
Time Limit: 1.00s
Memory Limit: 32M
Added: Jul 02, 2013
Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3
Comments (Search)
It's quiet in here...