ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > CEN_114 Midterm B > задача:


13. 51124 - Easy Tiae words

CEN_114 Midterm B

Старт: 14.мая.2020 в 00:00:01
Финиш: 31.мая.2020 в 23:59:59
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (1)

Задачи турнира

• 10. 51095 - Normal and Trace
• 11. 51089 - Multiply a row and add i...
• 12. 50749 - Min Distance
• 13. 51124 - Easy Tiae words
• 14. 51136 - Class Average 2
• 15. 50734 - Product Info (In Srt)
• 2. 50453 - The Cubic Difference
• 3. 50346 - The Biggest Date
• 5. 50380 - Sum of the Numbers in t...
• 6. 50443 - Dajte Express
• 7. 50496 - Falling Bricks
• 8. 51123 - Mr. Li Criteria

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

Easy Tiae words

Dr. Tiae has difficulty reading words with too many consonants. She likes the words with more vowels (a, e, i, o, and u). She defines the ease of a word

For example, the word "Lai" has 2 vowels and 3 letters. So, its TV is 66.667. The values closer to 0 are difficult, the values closer to 100 are easier. As another example Eyjafjallajokull is a difficult word, because it has 6 vowels with a TV 37.5.

Question: Write a program that reads a list of (n) words. Then, the program prints the top (m) easy Tiae words. If there are two words whose difficulty is similar (TV difference is less than 0.0001) show the words in alphabetical order (A is before B).
Note: If needed you can use
  bool isVowel(char ch);
function from   #include "utils/functions.h" library.

Input specification: You will be given two integers: the number of words (n), and the number of top (m) Tiae words to show. The following n lines contain a word (words contain only 26 English uppercase or lowercase letters) where 0 ≤ m ≤ n ≤ 50,000.

Output specification: Show top m easy words.

Sample Input 1 Sample Input 2
8 4
Yu
Tan
Ana
Elma
Alexander
Lorraine
Francesko
Tania
8 4
Tiziana
Oltiona
Astrit
Enisa
Gresa
Shi
Elidjona
Sabina
Sample Output 1 Sample Output 2
Ana
Tania
Elma
Lorraine
Enisa
Oltiona
Tiziana
Elidjona

Explanation: The list of Tiae words sorted according to difficulty for the sample input 1:
  Ana 66.667
  Tania 60
  Elma 50
  Lorraine 50
  Yu 50
  Alexander 44.444
  Francesko 33.333
  Tan 33.333

The words "Elma" "Lorraine" and "Yu" have the same difficulty. So, they are in alphabetical order.



Для отправки решений необходимо выполнить вход.

www.contester.ru