标签:os io strong ar ios har poj on
#include <iostream>
#include <string>
#include <map>
using namespace std;
char s[100],s1[100],s2[100];
map <string,string> my;
map <string,string> ::iterator it;
int main(int argc, char *argv[])
{
int i;
while (gets(s))
{
if (strcmp(s,"")==0) break;
sscanf(s,"%s%s",s1,s2);
my[s2]=s1;
}
while (scanf("%s",s)!=EOF)
{
it=my.find(s);
if ( it!=my.end()) cout<<my[s]<<endl;
else cout<<"eh\n";
}
return 0;
}
标签:os io strong ar ios har poj on
原文地址:http://www.cnblogs.com/2014acm/p/3902556.html