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

33225번 - Glass Reflection 다국어

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

문제

Late in the evening, you are sitting at the Funky Punk Café and feeling a bit bored because you have not done any programming all day. You stare out of the window and see that the text on the neon signs gets reflected in a funny way: the letters are partially overlapping, because the window is made of double-paned glass. Would it be possible to automatically read the text of the sign, just by looking at this mangled reflection? With a burst of sudden inspiration, you grab your laptop and OCR1 camera from your bag, and start programming.

Your OCR camera appears to correctly recognize the letters in the reflection when it accounts for the mirroring, except that all the letters are duplicated. Moreover, if the text on the sign contains double (or more) letters, their reflection partially overlaps, resulting in only one more letter than there would be in the original word. For example, the word "beer" is reflected as "bbeeerr", and the word "ooo" is reflected as "oooo". All that is left for you to do, is to write a program that converts these reflected words back to their original form.


1OCR = Optical Character Recognition

입력

The input consists of:

  • One line containing a string of up to 10ドル^6$ English lowercase letters (a-z), the reflected word read by your OCR camera.

출력

Output the word in its original form.

제한

예제 입력 1

bbeeerr

예제 출력 1

beer

예제 입력 2

sskkiilllleesssnneesss

예제 출력 2

skilllessness

예제 입력 3

bbaalllooonnnoookkkeeeppeerr

예제 출력 3

balloonnookkeeper

힌트

출처

University > Delft University of Technology > Freshmen Programming Contest 2022 G번

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

출처

대학교 대회

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

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