Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
127714 | 刘星辰liuxingchen | 神族文字 | C++ | 通过 | 100 | 620 MS | 11188 KB | 678 | 2024-01-25 10:00:05 |
#include<bits/stdc++.h> using namespace std; string s; string st; string stt; map<string,string> mp; bool b; int main() { while(getline(cin,s)) { if(s.size()==0) { continue; } b=0; for(int i=0;i<s.size();i++) { if(s[i]==' ') { st=""; b=1; } else if(b==1) { st+=s[i]; } } if(b==1) { stt=""; for(int i=0;i<s.size();i++) { if(s[i]!=' ') { stt+=s[i]; } else { break; } } mp[st]=stt; } else { if(mp.find(s)!=mp.end()) { cout<<mp[s]; } else { cout<<"eh"; } cout<<endl; } } return 0; }