Logo
(追記) (追記ここまで)

14014번 - Dudu of English 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB375704719.028%

문제

"your uf of library have bugs" -- Dudu, 2015

Dudu realized that English is a very inefficient language. To address this issue he created his own dialect: dudu of english. Here are a couple of examples:

  • From "The Union-Find in your library has bugs!" to "yur uf of lbrary hve bugs"
  • From "My professor is funny sometimes." to "prfessor of funny smtimes"

Your job is to write the first translator from English to dudu of english, using the following rules:

  • All capital letters should be "decapitalized." dudu of english speakers are humble.
  • Prepositions are overrated, and Dudu has realized that certain words are pretty much equivalent. They are called of-words, and should be translated simply to "of." A list of of-words will be given below.
  • For Dudu, vowels don't improve readability. If a word has K vowels, you should remove the first K/2 of them, rounded down. Dudu considers a, e, i, o, and u to be vowels.
  • All punctuation should be removed. Who likes commas anyway?
  • All line breaks should be removed from the initial input, and replaced with spaces.
  • Any sequence of spaces in the input should be condensed to a single space. Dudu is not wasteful.
  • Dudu prefers to read only short lines, but he doesn't like breaking words either. As you print the output, if a word causes the current line to exceed 20 characters in length (not including spaces), put a line break after it.

The rules should be applied in the order specified above. Don't print any leading spaces (spaces at the beginning of a line).

of-words are: of, to, into, onto, above, below, from, by, is, at.

Dudu considers any character that isn't a lowercase or uppercase letter, a space, or a line break to be punctuation.

입력

The input will start with an integer N indicating the number of lines to be translated.

The next N lines will contain the text to be translated.

  • 1 ≤ N ≤ 50

The total length of the text to be translated won't exceed 5000 characters.

출력

utput the text of the nput
trnslated of ddu of nglish

제한

예제 입력 1

3
Output the text from the input, translated into dudu of English.
To Kill a Mockingbird.
To be or not to be, that is the question.

예제 출력 1

utput the text of the nput 
trnslated of ddu of nglish 
of kill a mckingbird of be 
or not of be that of the qstion

힌트

ddu of nglish of rdable nough
of not hve xplnation

출처

School > Cornell University High School Programming Contest > Cornell University High School Programming Contest 2016 K번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /