Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Butcher of Vowels

By ishtupeed · Limits 1s, 512 MB

…if I’m to choose between one evil and another, then I prefer not to choose at all. – Geralt (The Last Wish)

Geralt of Rivia is a legendary witcher of the School of the Wolf active throughout the 13th century. During the Trial of the Grasses or Herbs, Geralt exhibited unusual tolerance for the mutagens that grant witchers their abilities. Accordingly, Geralt was subjected to further experimental mutagens which rendered his hair white and may have given him greater speed, strength, and stamina than his fellow witchers. After undergoing the trial, Geralt became a powerful monster slayer.

Geralt’s story is not one of those heroes, instead it’s a story of a professional. His profession is to kill monsters. But he only kills a monster if its evil or harmful to other beings. How does he determine if the monster is harmful you may ask. Well, it’s in the name of the monsters. If the name of the monster contains any single vowel (a, e, i, o, u), the monster is considered as evil.

In this problem, you will be given the names of the monsters. You have to determine whether Geralt will kill them or not.


The first line of the input contains an integer $T (1 \leq T \leq 100)$, the number of monster names you will be given.

Following $T$ lines each contain a single string $S (1 \leq |S| \leq 10)$, the name of the monster. The name can contain lowercase English alphabet, the character ’_’ (underscore), and ’.’ (dot).

Here, $|S|$ denotes the length of the string $S$.


For each name, print “Yes” (without the quotes) if the monster is evil. Otherwise, print “No” (without the quotes).





96% Solution Ratio

code_firesEarliest, 1M ago

code_firesFastest, 0.0s

code_firesLightest, 0 B

TibyanShortest, 110B


Login to submit