| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 45 | 38 | 26 | 83.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.
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
APLUS UIL ROCKS OUDLLUDL#OUALULUHD ODHHLL