Problem C: 【中级组】查询药品名
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:202
Solved:115
Description
医院药房用六位数字为每一种药品编码。现有n种药品,其编码存放在id数组中,且从小到大已排好序,而对应的药品名存放在drug药品名数组中。要求输入药品编码,查询输出其药品名称。
Input
输入有三行,第一行为 n 数组元素的个数及欲查询的药品编号 m。第二行为id数组中的n个药品编码。第三行为drug数组中的n个药品名称。数据之间用空格分隔。
Output
输出查询到对应的药品名称。
Sample Input Copy
5 100205
100117 100119 100202 100205 100208
Fosinopril Aciclovir Ampicillin Ornidazole Vidarabine
Sample Output Copy
Ornidazole