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

18155번 - Issuing Plates 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB1571008961.806%

문제

You are writing the code to check license plates. These consist of upper letters ‘A’–‘Z’ and numbers ‘0’–‘9’. You want to make sure the codes do not contain any bad words, even considering leetspeak.

Given some input strings, which are valid license plates?

In leetspeak we have the following equivalences: 0=O 1=L 2=Z 3=E 5=S 6=B 7=T 8=B

입력

The first line will contain the integers N and M with 0 ≤ N, M ≤ 100. Following this will be N lines containing bad words; each such word will contain only uppercase alphabetic characters (‘A’–‘Z’) and be at most 25 characters long. Then there will be M lines containing the plates to check; each such plate will consist of only uppercase alphabetic characters and numeric digits (‘0’–‘9’) and be at most 25 characters long.

출력

Your output will be M lines, one per plate, in the same order as the plates are given on the input. If the plate is valid, write out the string ‘VALID’; otherwise write out the string ‘INVALID’.

제한

예제 입력 1

7 2
AWFUL
BAD
CRUMMY
LOUSY
POOR
SAD
TERRIBLE
SO5OD
TROUBADOUR

예제 출력 1

VALID
INVALID

힌트

출처

ICPC > Regionals > North America > Pacific Northwest Regional > 2019 ICPC Pacific Northwest Region > Division 2 U번

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

출처

대학교 대회

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

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