水题。。
#include<iostream>
#include<string>
#include<map>
using namespace std;
int main()
{
string line;
map<string, string> mp;
while (getline(cin, line), line != "")
{
size_t mid = line.find(' ');
mp[line.substr(mid + 1, line.size())] = line.substr(0, mid);
}
while (getline(cin, line), line != "")
{
if (mp.end() != mp.find(line))
cout << mp[line] << endl;
else
cout << "eh" << endl;
}
return 0;
}