JDCC '16 Contest 4 P1 - Vibberish or Cibberish?

View as PDF

Submit solution

Points: 5
Time limit: 2.0s
Memory limit: 64M

Problem type

After years of scanning the skies, humans have finally found evidence of extraterrestrial life. From a dark patch of the sky came an alien transmission - an attempt at contact. After months of painstaking analysis, it was determined that the aliens spoke two languages: Vibberish and Cibberish.

Vibberish is a smooth and simple language that mostly uses words that have more vowels than consonants. On the other hand, the difficult-to-pronounce Cibberish language prefers words with more consonants than vowels.

As the leading computer scientist at SETI, you have been tasked with detecting the language of a transmission. Given a sentence from the transmission, determine whether it is more likely to be Vibberish or Cibberish. (For our purposes, only a, e, i, o, and u are considered vowels).


Each test case contains one sentence of the alien transmission. The sentence will contain no more than \(10^5\) lower-case letters and spaces.


For each test case, output Vibberish if the text is most likely in Vibberish or Cibberish if the text is most likely in Cibberish. If it is equally likely to be Vibberish or Cibberish, then output Gibberish.

Sample Input

asdfeji isfldkj sfdjkdflj wjiewjlf

Sample Output


Sample Input

aeiou dundundun

Sample Output


Sample Input

aeiou cool

Sample Output


Explanation for Sample Input

In the first case, all four words have more consonants than vowels, so it’s likely Cibberish.

In the second case, one word has mostly vowels and one word has mostly consonants, so it’s Gibberish.

In the last case, there is one word with a vowel majority and no words with a consonant majority, so it’s likely Vibberish.


There are no comments at the moment.