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

3569번 - Javanese Cryptoanalysis 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB311100.000%

문제

Javanese is the language of the people in the Central and Eastern parts of the island of Java, Indonesia.

In 1926, a standard orthography using the English Alphabet was created for the Javanese language. This writing system uses all letters from A to Z. The five letters A, E, I, O, and U are vowels, while all other letters are consonants. In Javanese words vowels and consonants always alternate. This property is quite useful when deciphering encrypted Javanese texts.

A text s consists of words, each word contains only capital letters. Let’s call text s legitimate if in each word of s vowels and consonants alternate (no two vowels and no two consonants are located next to each other).

A simple substitution cipher is applied to a text s. That is, a bijection f : A → A is chosen, where A is the set of capital letters. The encoded text t is obtained from s by substituting each letter c with f(c).

You’re given the encoded text t. Find any legitimate text s that can be encoded as t, or detect that there is no such legitimate s.

입력

The input file contains the encoded text t, a list of words separated by spaces and/or line breaks. Each word consists only of capital letters (A to Z).

The input file contains no more than 100 000 characters.

출력

If the text t cannot be an encoded legitimate text, output only one word impossible.

Otherwise, output any legitimate text s that can be encoded into t. Separate words of s with spaces and/or line breaks. All letters in s should be capital.

제한

예제 입력 1

O RISK LIP FOCUS LUCKY

예제 출력 1

A CODE FOR VALID FILES

예제 입력 2

NEERC

예제 출력 2

impossible

힌트

출처

ICPC > Regionals > Northern Eurasia > Northern Eurasia Finals > NEERC 2008 J번

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

출처

대학교 대회

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

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