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

Разделы > Структуры данных > задача:


50836 - Censored

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

Задачи раздела

• 50770 - Average Depth
• 50411 - Sum of the Leaves
• 50830 - Sorting BST Nodes
• 50803 - Sum of the depths in BST
• 50805 - Sum of the weights in a BST
• 50818 - Depth Limited BST
• 50836 - Censored
• 50816 - Largest Sum Path
• 50772 - The Path of a Node
• 50863 - Total Access Cost of a BST
• 50771 - BST Level Sum
• 50773 - Balanced Sum Tree
• 50722 - Problemi i shkencetarit

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

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

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

Censored

The company you are working is very sensitive about the emails sent. They want to filter the sensitive (Censored) words from the emails.

Question: Write a program that removes the "Censored" words from a given text. Note: It's provided that the list random. However, due to the number of searches, the problem will give time limit error. You should better use Hash-Map or or BST or sort the list and use binary-search

Input specification
First, you will be given an integer: the number of blacklisted words (n) where 1 ≤ n ≤ 35,000. In the following n lines you will be given n words which contain only (uppercase or lowercase) English letters. Then starting from the next line, you will be given unknown length of text.

Output specification:
Show the words as they are, if they are not listed in the Censored list. Show **** otherwise.
Note: You may show endline after every 15 words.

Sample Input I
3
some
Company
the
The company is very
sensitive about some numbers
Sample Output I
**** **** is very sensitive about **** numbers



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

www.contester.ru