POJ2503(gets)
难点:字符串处理
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
#include <iostream> #include <cstring> #include <cstdio> #include <map> using namespace std; char ss[100],s1[50],s2[50]; string s3; map<string,string> mp; int main(){ //freopen("in","r",stdin); while(gets(ss)){ if(!strlen(ss)) break; sscanf(ss,"%s %s",s1,s2); mp[s2] = s1; } while(cin >> s3){ if(mp.find(s3) != mp.end()) cout << mp[s3] << endl; else puts("eh"); } return 0; }