全部评论
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
using namespace std;
typedef long long LL;
const int maxn=1005;
int n,m,t;
map<string,string>ma;
int main(){
while(cin>>n>>m){
map<string,string>ma;
string s1,s2;
for(int i=0;i<n;i++){
cin>>s1>>s2;
ma[s1]=s2;
}
for(int i=0;i<m;i++){
cin>>s1;
cout<<ma[s1]<<endl;
}
cin>>n>>m;
for(int i=0;i<n;i++){
cin>>s1>>s2;
ma[s1]=s2;
}
for(int i=0;i<m;i++){
cin>>s1;
cout<<ma[s1]<<endl;
}
}
return 0;
}
在线同求
相关推荐
查看6道真题和解析 点赞 评论 收藏
分享
点赞 评论 收藏
分享
小浪_Coding:你问别人,本来就是有求于人,别人肯定没有义务免费回答你丫, 有点流量每天私信可能都十几,几十条的,大家都有工作和自己的事情, 付费也是正常的, 就像你请别人搭把手, 总得给人家买瓶水喝吧 点赞 评论 收藏
分享