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

26508번 - Semmy 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB45382683.871%

문제

In the semaphore signaling system, two flags are held, one in each hand, with arms extended, in various positions representing the letters of the alphabet. The pattern resembles a compass rose divided into eight positions: up (U), down (D), out (O), high (H) and low (L), for each hand. The left hand signal is always read first. Additionally, six letters require a hand to be brought across the body so that both flags are on the same side. As an example the letter H has the left hand across the body and held low (AL).

ALPHA LEFT RIGHT ALPHA LEFT RIGHT
A D L N L L
B D O O AH O
C D H P U O
D D U Q H O
E H D R O O
F O D S L O
G L D T U H
H AL O U H H
I AL U V L U
J O U W O AH
K U L X L AH
L H L Y O H
M O L Z O AL

입력

A data file that contains all letter/signal combinations on the first 26 lines, followed by two sets of data, each starting with an integer N. The first group contains N coded expressions that represent words or phrases, and the second group contains N English words or phrases. In the first group, a # indicates a space between words.

출력

Decode the first group of coded signal expressions into the English word or phrase, and encode the second group into the appropriate signal expression, with any spaces between words represented by the # sign.

제한

예제 입력 1

ADL
BDO
CDH
DDU
EHD
FOD
GLD
HALO
IALU
JOU
KUL
LHL
MOL
NLL
OAHO
PUO
QHO
ROO
SLO
TUH
UHH
VLU
WOAH
XLAH
YOH
ZOAL
2
DLUOHLHHLO
HHALUHL#OOAHODHULLO
2
JAVA JIVE
FUN

예제 출력 1

APLUS
UIL ROCKS
OUDLLUDL#OUALULUHD
ODHHLL

힌트

출처

School > PLU High School Programming Contest > PLU 2016 > Novice 9번

School > PLU High School Programming Contest > PLU 2016 > Advanced 12번

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

출처

대학교 대회

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

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