U612583 翻译官1 The Translator 1
题目背景
黄金国与明月国交战之际,来自阿曼达尔星球的人们来到了这片大陆上,他们有自己的语言,你被委派做翻译。
During the war between the Golden Kingdom and the Moon Kingdom, people from the planet Amendal arrived on this continent. They have their own language, and you have been assigned as the translator.
题目描述
你有一份词典,包含 $n$ 个词语,每个阿曼达尔语词语 $Amd_i$ 都有其英文解释 $Kst_i$,你接受到了 $m$ 句阿曼达尔语句子,你需要将它们翻译。
You have a dictionary containing $n$ words, where each Amandalian word $Amd_i$ has its English explanation $Kst_i$. You have received $m$ Amandalian sentences and need to translate them.
输入格式
输入包含两部分:
- 第一部分词典,包含若干行。第一行是 `Dictionary:` 表示该部分开始,之后每行首先是序列编号,然后是阿曼达尔语词语,随后是对应的英语词语,三段内容用空格隔开,如 `1. kostal alien`。
- 第二部分句子,包含若干行。第一行是 `Sentence:` 表示该部分开始,之后每行首先是序列编号,然后是阿曼达尔语句子,两段内容用空格隔开,如 `1. I'm kostal`。
最后用一个`end`表示结束。
The input consists of two parts:
- The first part of the dictionary consists of several lines. The first line is `Dictionary:` indicating the beginning of the section, followed by the sequence number, then the Amanda language word, and then the corresponding English word. The three paragraphs are separated by spaces, such as `1. kostal alien`。
- The second part of the sentence consists of several lines. The first line is `Sentence:` indicating the beginning of the section, followed by a sequence number for each line, followed by an Amanda language sentence, separated by a space, such as `1. I'm kostal`.
Finally, use an `end` to indicate the end.
输出格式
输出先是 `Translation:` 表示开始,之后每行:
- 输出一个序号,从`1.`开始排序。
- 输出句子,把 `Sentence` 中的句子翻译成英语。
注意:如果有词典里没有的单词,则输出 `?`。
两部分用空格隔开,例如对于 `1. I'm kostal`,输出 `1. ? alien`。
The output starts with `Translation:` indicating the beginning, followed by each line:
- Output a sequence number, sorted starting from `1.`.
- Output sentences and translate the sentences in `Sentence` into English.
Note: If there are words that are not in the dictionary, output `?`.
Separate the two parts with a space, for example, for ` 1 I'm kostal`, output ` 1 ? alien`。
说明/提示
#### 数据范围:
$1\leq n\leq 100$,$1\leq m