您的位置:首页 > 运维架构

[OpenJudge-NOI]词典 stl

2015-11-05 11:11 483 查看

代码

#include <cstdio>
#include <iostream>
#include <cstring>
#include <map>
#include <string>
using namespace std;

char str[100005],a[100005],b[100005];
map<string,string> m;

int main(){
while(gets(str)&&str[0]!='\0'){
sscanf(str,"%s%s",a,b);
m[b]=a;
}
while(gets(str)){
if(m.find(str)==m.end()){
cout<<"eh"<<endl;
}else{
cout<<m[str]<<endl;
}
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: