시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 50 5 4 13.793%

문제

배비지등의 디지털 방식 조판이 없었던 시대에는, 조판은 숙련공들만이 할 수 있는 예술의 일종이었다. 인쇄 공간 절약과 아름다움을 위해 특정한 문자의 조합은 하나의 문자로 나타내었으며 이것을 ligature라 한다. 예를 들면 a-e의 ligature는 ‘æ’이며 f-i의 ligature는 ‘fi’이다. (힌트에 가능한 모든 ligature 조합을 표시한 표가 있다)

또한 소문자 s를 나타내는 방법에는 “long s”와 “short s” 두 가지 방법이 있었으며, 오늘날에는“short s”의 형태만 쓰인다. 어떤 방법을 쓸지 결정하는 규칙은 이상하지만 복잡하지는 않다.

1. Short s는 단어의 끝 또는 하이픈(-)과 어퍼스트로피(`)같은 단어 속에 있는 구두점 앞에 쓴다.

예) programs, ſucceſs, hocus-pocus, revis’d

2. Short s는 ‘f’, ‘b’, ‘k’앞에 쓴다.

예) transfer, husband, ask, ſucceſsful

3. ‘ss’로 끝나는 단어 뒤에 ‘s’로 시작하는 단어가 합성되어 ‘sss’가 포함된 단어의 경우, 가운데 s는 short s로, 나머지 s는 long s로 쓴다.

예) croſsſtitch, croſsſtaff

4.위의 경우 이외에는 모두 long s로 쓴다.

조판에 있어 “단어”라는 말이 “식별자”와는 다른 것임에 주의하자. 식별자는 ‘_’나 ‘\$’같은 구두점도 포함할 수 있는 반면, 단어는 문자만을 의미한다. 따라서 “radius3”이나 “adios_amigio”같은 식별자는 “radiu∫3”, “adio∫_amigo”가 아니라 “radius3”, “adios_amigo”로 조판된다.

입력

입력의 첫 줄에 테스트의 개수인 정수 P(1<=P<=1000)가 주어진다.

각각의 테스트는 1000자 이하의 문자열이 한 줄로 주어진다.

출력

각각의 테스트에 대해 입력 문자열을 적절한 ligature와 “long s” 코드로 대체하여 출력한다. 다음 페이지의 표에 기호와 ligature에 대응하는 코드가 표시되어 있다. (short s는 바꾸지 않고 그대로 출력하며, ‘IE’와 ‘OE’는 대문자 I-E, 대문자 O-E조합에 한해서 ligature로 나타낸다.)

예제 입력 1

3 
Last night, we went to see 
"Oedipus Rex" at the 
AEgyptian's theater.

예제 출력 1

La[longst] night, we went to [longs]ee 
"[OE]dipus Rex" at the 
[AE]gyptian's theater.

힌트

입력 심볼 출력 코드
AE Æ [AE]
ae æ [ae]
OE Π[OE]
oe œ [oe]
ct [ct]
ff [ff]
fi [fi]
fl [fl]
ffi [ffi]
ffl [ffl]
s (short) s s
s (long) ſ [longs]
si [longsi]
sh [longsh]
sl [longsl]
ss [longss]
st [longst]
ssi [longssi]

long과 short s는 혼합해서 사용할 수 있다. 예를 들어, crossstitch는 cro[longs]s[longst]itch이 된다. (cro[longs]s[longs]titch는 정답이 아니다)

W3sicHJvYmxlbV9pZCI6IjI2OTAiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM2MWJcdWIwYTBcdWM1ZDBcdWIyOTQgXHVjODcwXHVkMzEwXHVjNzQ0IFx1YzViNFx1YjViYlx1YWM4YyBcdWQ1ODhcdWM3NDRcdWFlNGM/IiwiZGVzY3JpcHRpb24iOiI8cD5cdWJjMzBcdWJlNDRcdWM5YzBcdWI0ZjFcdWM3NTggXHViNTE0XHVjOWMwXHVkMTM4IFx1YmMyOVx1YzJkZCBcdWM4NzBcdWQzMTBcdWM3NzQgXHVjNWM2XHVjNWM4XHViMzU4IFx1YzJkY1x1YjMwMFx1YzVkMFx1YjI5NCwgXHVjODcwXHVkMzEwXHVjNzQwIFx1YzIxOVx1YjgyOFx1YWNmNVx1YjRlNFx1YjljY1x1Yzc3NCBcdWQ1NjAgXHVjMjE4IFx1Yzc4OFx1YjI5NCBcdWM2MDhcdWMyMjBcdWM3NTggXHVjNzdjXHVjODg1XHVjNzc0XHVjNWM4XHViMmU0LiBcdWM3NzhcdWMxYzQgXHVhY2Y1XHVhYzA0IFx1YzgwOFx1YzU3ZFx1YWNmYyBcdWM1NDRcdWI5ODRcdWIyZTRcdWM2YzBcdWM3NDQgXHVjNzA0XH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ztjcm9bbG9uZ3Ndc1tsb25nc3RdaXRjaCwmcmRxdW87IG5vdCAmbGRxdW87Y3JvW2xvbmdzXXNbbG9uZ3NddGl0Y2gsJnJkcXVvOzxcL3A+XHJcbiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

ACM-ICPC > Regionals > North America > Greater New York Region > 2010 Greater New York Programming Contest G번