Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
128625 | 黄恩宁 | 神族文字 | C++ | 通过 | 100 | 637 MS | 11196 KB | 435 | 2024-01-25 22:49:18 |
#include<iostream> #include<cstdio> #include<string> #include<cstring> #include<map> using namespace std; map<string,string> mp; int main() { string s; int i; while(getline(cin,s)) { string a,b; i=0; if(s=="") break; while(s[i]!=' ') a=a+s[i++]; i++; while(i<s.size()) b=b+s[i++]; mp[b]=a; } while(cin>>s) { if(mp.count(s)==true) cout<<mp[s]<<endl; else cout<<"eh\n"; } return 0; }