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

14043번 - Ragaman 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB21316613879.310%

문제

An anagram of a string is formed by rearranging the letters in the string. For example, the anagrams of aab are aab, aba, and baa.

A wildcard anagram of a string is an anagram of the string where some of the letters might have been replaced with an asterisk (*). For example, two possible wildcard anagrams of aab are *ab and *b*.

Given two strings, determine whether the second string is a wildcard anagram of the first string.

입력

The two lines of input will both consist of N (1 ≤ N ≤ 100) characters. Each character in the first line will be a lowercase letter. Each character in the second line will be either a lowercase letter or an asterisk.

출력

Output the character A if the string on the second line is a wildcard anagram of the string on the first line. Otherwise, output the character N.

제한

예제 입력 1

abba
baaa

예제 출력 1

N

예제 입력 2

cccrocks
socc*rk*

예제 출력 2

A

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2016 > CCC 2016 Senior Division 1번

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

출처

대학교 대회

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

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