HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50767 - Censor

Guest
• Review clarifications (1)

Volume problems

• 50364 - Student averages
• 50756 - Average of the Nth Student
• 50758 - National Elections - Revisited
• 50458 - Weekly Report
• Raporti Javor
• 50555 - Frequency of Letters
• 50592 - Matrix Multiplication
• 50653 - Long Divide
• 50767 - Censor
• 50792 - The student with the highest...
• 060. 50389 - Reverse an Array
• 100. 50330 - Find the average of n ...
• 110. 50359 - Mode of a Series
• 120. 50329 - Draw Matrix-1
• 120. 50331 - Number of Numbers o...
• 155. 50726 - Pascal Triangle - 1
• 180. 50755- Top N Donors - 1

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
From Canadian Informatics Olympiad.

CENSOR

Shqip
The Society for the Prevention of Profanity on the Internet has observed a growing number of chat lines on the World-Wide Web. A chat line allows a Web user to type lines of text which are transmitted to all other users. The Society is concerned about the number of four-letter words being transmitted by these chat lines and has proposed the mandatory use of software to remove all four-letter words from every transmission. Your job is to write the software to do this removal.

Input specification
The input to your program consists of an integer, n, on a line by itself, followed by n lines of text. Each line of text contains words separated by spaces. Each word consists of letters of the alphabet and exactly one space separates adjacent words. Lines do not exceed 80 characters in length.

Output specification
The output from your program should consists of the n lines of text, with each four-letter word replaced by four asterisks. The lines should be separated by one blank line.


Sample Input
2
The quick brown fox jumps over the lazy dog
Now is the time for all good people to come to the aid of the party

Sample Output
The quick brown fox jumps **** the **** dog
Now is the **** for all **** people to **** to the aid of the party

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

www.contester.ru