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

33106번 - Problem C 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB89785391.379%

문제

The English language is infamous for having an inconsistent spelling system. One feature in the spelling system that you are interested in is the usage of the letter c. The letter c can be pronounced in multiple different ways, which might be confusing for the speaker. However, there are some simplified patterns to help speakers determine which pronunciation to use.

  • It is pronounced as ⟨k⟩ if it is either: followed by a, o, or u; followed by a consonant letter other than h and y; or at the end of a word. The consonant letters are the English letters excluding the vowel letters: a, e, i, o, and u.
  • It is pronounced as ⟨s⟩ if it is followed by e, i, or y.
  • The pair of adjacent letters ch is pronounced with a unique sound ⟨c⟩.

You are given $N$ words: $S_1, S_2, \dots , S_N$. For each given word, simplify the spelling system by replacing every occurence of c into k or s (for the sound ⟨k⟩ and ⟨s⟩ respectively) according to the patterns above and every occurence of ch into c.

입력

The first line consists of an integer $N$ (1ドル ≤ N ≤ 100$).

Each of the next $N$ lines consists of a string $S_i$. String $S_i$ consists of only lowercase English letters, and its length is between 1ドル$ and 100ドル$.

출력

For each word, output a single line containing a string that represents the simplified spelling system of string $S_i$ according to the patterns above.

제한

예제 입력 1

10
cyan
circle
ceramic
coccyx
delicacy
chacha
coach
blackjack
church
hiccup

예제 출력 1

syan
sirkle
seramik
koksyx
delikasy
caca
koac
blakkjakk
curc
hikkup

예제 입력 2

6
caesar
cillian
celtic
character
chef
echelon

예제 출력 2

kaesar
sillian
seltik
carakter
cef
ecelon

예제 입력 3

4
cacbcccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyczc
abdefghijklmnopqrstuvwxyz
cchh
cc

예제 출력 3

kakbkkkdsekfkgcsikjkkklkmknkokpkqkrksktkukvkwkxsykzk
abdefghijklmnopqrstuvwxyz
kch
kk

힌트

출처

ICPC > Regionals > Asia Pacific > Indonesia > Indonesia National Contest > INC 2024 A번

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

출처

대학교 대회

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

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