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

30608번 - Missing Vowels 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB158655138.636%

문제

There are many ways to write a word on paper. For example, some writing systems, like Arabic and Hebrew, omit most vowels, although they write some of them.

In this problem, we will only consider strings consisting of English letters and hyphens. Letters 'a', 'e', 'i', 'o', 'u', and 'y' are considered to be vowels, while hyphens and all other letters are considered to be consonants. All comparisons are case-insensitive: uppercase and lowercase versions of the same letter are considered equal.

You are given two strings $s$ and $f,ドル called the short name and the full name, respectively. Your task is to check whether the short name $s$ can be obtained from the full name $f$ by omitting some vowels (possibly none).

입력

The first line contains a single string $s,ドル denoting the short name.

The second line contains a single string $f,ドル denoting the full name.

Each string is non-empty and consists of at most 1000ドル$ English letters and hyphens.

출력

Print "Same" if the short name $s$ can be obtained from the long name $f$ by omitting some vowels, and "Different" otherwise.

제한

예제 입력 1

Shrm-el-Shikh
Sharm-el-Sheikh

예제 출력 1

Same

예제 입력 2

Eilot
Eilat

예제 출력 2

Different

예제 입력 3

Saint-Petersburg
Saint-Petersburg

예제 출력 3

Same

예제 입력 4

Bcdfghjklmnpqrstvwxz
Abcdefghijklmnopqrstuvwxzyy

예제 출력 4

Same

예제 입력 5

Aa
aaaA

예제 출력 5

Same

예제 입력 6

Etis-Atis-Amatis
Etis-Atis-Animatis

예제 출력 6

Different

예제 입력 7

will-the-wisp
will-o-the-wisp

예제 출력 7

Different

예제 입력 8

--a-very-short-name--
long-name

예제 출력 8

Different

힌트

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > ICPC 2023-2024 Northwestern Russia Regional Contest M번

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

출처

대학교 대회

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

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